mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Add GC.SuppressFinalize
This commit is contained in:
@@ -34,5 +34,6 @@ public abstract class FakeDriverBase : IDisposable
|
|||||||
public void Dispose ()
|
public void Dispose ()
|
||||||
{
|
{
|
||||||
Application.ResetState (true);
|
Application.ResetState (true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class GlobalTestSetup : IDisposable
|
|||||||
CheckDefaultState ();
|
CheckDefaultState ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose ()
|
public void Dispose ()
|
||||||
{
|
{
|
||||||
// Optionally reset EnableDebugIDisposableAsserts after tests. Don't do this.
|
// Optionally reset EnableDebugIDisposableAsserts after tests. Don't do this.
|
||||||
@@ -26,6 +27,7 @@ public class GlobalTestSetup : IDisposable
|
|||||||
// TODO: Add an Assert to ensure none of the state of ConfigurationManager changed.
|
// TODO: Add an Assert to ensure none of the state of ConfigurationManager changed.
|
||||||
Application.ResetState (true);
|
Application.ResetState (true);
|
||||||
CheckDefaultState ();
|
CheckDefaultState ();
|
||||||
|
GC.SuppressFinalize (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPORTANT: Ensure this matches the code in Init_ResetState_Resets_Properties
|
// IMPORTANT: Ensure this matches the code in Init_ResetState_Resets_Properties
|
||||||
|
|||||||
Reference in New Issue
Block a user