Skip to content

Commit

Permalink
Update DisposableBase.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Mar 17, 2024
1 parent 86bf270 commit 395cd82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions csharp/Platform.Disposables/DisposableBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ protected virtual void Dispose(bool manual)
Dispose(manual, wasDisposed);
}
}

private static void OnProcessExit(object sender, EventArgs e)
{
while (_disposablesWeekReferencesStack.TryPop(out WeakReference<DisposableBase> weakReference))
Expand All @@ -166,6 +167,7 @@ private static void OnProcessExit(object sender, EventArgs e)
}
UnsubscribeFromProcessExitedEventIfPossible();
}

private static void UnsubscribeFromProcessExitedEventIfPossible()
{
try
Expand Down

0 comments on commit 395cd82

Please sign in to comment.