Fix unit test error not disposing static variables.

This commit is contained in:
BDisp
2023-03-15 21:30:24 +00:00
parent ae6c95836a
commit 8715af2a42
3 changed files with 10 additions and 0 deletions

View File

@@ -1134,6 +1134,7 @@ namespace Terminal.Gui {
_initialized = false;
mouseGrabView = null;
_enableConsoleScrolling = false;
lastMouseOwnerView = null;
// Reset synchronization context to allow the user to run async/await,
// as the main loop has been ended, the synchronization context from

View File

@@ -984,6 +984,13 @@ namespace Terminal.Gui {
{
return MostFocused?.OnLeave (view) ?? base.OnLeave (view);
}
///<inheritdoc/>
protected override void Dispose (bool disposing)
{
dragPosition = null;
base.Dispose (disposing);
}
}
/// <summary>

View File

@@ -1163,6 +1163,8 @@ namespace Terminal.Gui.TopLevelTests {
│ this. │
│ │
└────────────────────────────┘", output);
Application.End (rs);
}
}
}