/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Data/Models/FreeableStore.cs
33 строки
678 B
Yair
Code Quality: Updated license header
31 дек 2024, 05:03
31 дек 2024, 05:03
8436c6d
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Data.Models { public abstract class FreeableStore<TImplementation> : IDisposable, IEquatable<TImplementation> where TImplementation : class { protected bool disposed; public override bool Equals(object? obj) { return obj is TImplementation objImpl ? Equals(objImpl) : base.Equals(obj); } public abstract TImplementation CreateCopy(); public abstract bool Equals(TImplementation? other); public abstract override int GetHashCode(); protected abstract void SecureFree(); public void Dispose() { SecureFree(); disposed = true; } } }