ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TrayButton Class / Dispose Method / Dispose(Boolean) Method
A value indicating, if true, that Dispose is being called from Dispose and if false, that Dispose is being called from the instance Finalizer

In This Topic
    Dispose(Boolean) Method
    In This Topic
    Invoked when the enclosing View is closed and disposed.
    Syntax
    protected virtual void Dispose( 
       bool isDisposing
    )
    Protected Overloads Overridable Sub Dispose( _
       ByVal isDisposing As Boolean _
    ) 

    Parameters

    isDisposing
    A value indicating, if true, that Dispose is being called from Dispose and if false, that Dispose is being called from the instance Finalizer
    Remarks

    Override this to ensure proper disposal of instance resources - it will be invoked only once.

    If the parameter isDisposing is true, then an override should dispose all managed and unmanaged objects.

    Otherwise, if isDisposing is false, then an override should dispose unmanaged objects only - because it is being called as part of the instance Finalizer.

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also