Skip to content

Commit

Permalink
Add finalizer to AxHost.State
Browse files Browse the repository at this point in the history
  • Loading branch information
lonitra committed Nov 8, 2022
1 parent b633ea3 commit edc7d34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/System.Windows.Forms/src/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
System.Windows.Forms.AxHost.State.Dispose() -> void
System.Windows.Forms.AxHost.State.~State() -> void
System.Windows.Forms.PrintPreviewControl.TabStop.get -> bool
System.Windows.Forms.PrintPreviewControl.TabStop.set -> void
System.Windows.Forms.PrintPreviewControl.TabStopChanged -> System.EventHandler?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,16 +392,15 @@ private unsafe void ReleaseResources()
_storage = null;
}

protected virtual void Dispose(bool disposing)
{
ReleaseResources();
}
protected virtual void Dispose(bool disposing) => ReleaseResources();

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

~State() => Dispose(false);
}
}
}

0 comments on commit edc7d34

Please sign in to comment.