Skip to content

Commit

Permalink
Add GC.SuppressFinalize(...) to ViewModelBase
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Apr 6, 2024
1 parent 05eeb57 commit 6daa312
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LightBulb/Framework/ViewModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ public abstract class ViewModelBase : ObservableObject, IDisposable

protected virtual void Dispose(bool disposing) { }

public void Dispose() => Dispose(true);
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
}

0 comments on commit 6daa312

Please sign in to comment.