EventHandlerList.Dispose Método
Definição
Descarta a lista de delegados.Disposes the delegate list.
public:
virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()
Implementações
Comentários
Chame Dispose quando terminar de usar o EventHandlerList .Call Dispose when you are finished using the EventHandlerList. O Dispose método deixa o EventHandlerList em um estado inutilizável.The Dispose method leaves the EventHandlerList in an unusable state. Depois Dispose de chamar, você deve liberar todas as referências para o para EventHandlerList que a memória que ela estava ocupando possa ser recuperada pela coleta de lixo.After calling Dispose, you must release all references to the EventHandlerList so the memory it was occupying can be reclaimed by garbage collection.
Observação
Sempre chame Dispose antes de liberar sua última referência para o EventHandlerList .Always call Dispose before you release your last reference to the EventHandlerList. Caso contrário, os recursos que o EventHandlerList está usando não serão liberados até que a coleta de lixo chame o EventHandlerList destruidor do objeto.Otherwise, the resources the EventHandlerList is using will not be freed until garbage collection calls the EventHandlerList object's destructor.