Επεξεργασία

Κοινή χρήση μέσω


EventHandlerList.Dispose Method

Definition

Disposes the delegate list.

public:
 virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

Implements

Remarks

Call Dispose when you are finished using the EventHandlerList. The Dispose method leaves the EventHandlerList in an unusable state. After calling Dispose, you must release all references to the EventHandlerList so the memory it was occupying can be reclaimed by garbage collection.

Note

Always call Dispose before you release your last reference to the EventHandlerList. Otherwise, the resources the EventHandlerList is using will not be freed until garbage collection calls the EventHandlerList object's destructor.

Applies to