mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Remove Finalize from FileEditor.
This commit is contained in:
parent
8695e89792
commit
2ac997610d
1 changed files with 3 additions and 12 deletions
|
|
@ -39,11 +39,6 @@ public class FileEditor<T> : IDisposable where T : class, IWritable
|
|||
_combo = new Combo(config, getFiles);
|
||||
}
|
||||
|
||||
~FileEditor()
|
||||
{
|
||||
DoDispose();
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
using var tab = ImRaii.TabItem(_tabName);
|
||||
|
|
@ -66,15 +61,11 @@ public class FileEditor<T> : IDisposable where T : class, IWritable
|
|||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DoDispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private void DoDispose()
|
||||
{
|
||||
(_currentFile as IDisposable)?.Dispose();
|
||||
_currentFile = null;
|
||||
(_defaultFile as IDisposable)?.Dispose();
|
||||
_defaultFile = null;
|
||||
}
|
||||
|
||||
private readonly string _tabName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue