EventHandlerList.Dispose Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om