ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX Namespace / DXUtil Class / Dispose<T> Method
The type of COM interface to dispose.
Object to dispose.

In This Topic
    Dispose<T> Method (DXUtil)
    In This Topic
    Safely dispose a referencem if not null, and set it to null after dispose.
    Syntax
    'Declaration
     
    Public Shared Sub Dispose(Of T As {Class, System.IDisposable})( _
       ByRef comObject As T _
    ) 
    public static void Dispose<T>( 
       ref T comObject
    )
    where T: class, System.IDisposable

    Parameters

    comObject
    Object to dispose.

    Type Parameters

    T
    The type of COM interface to dispose.
    Remarks
    The reference will be set to null after dispose.
    See Also