asp.net.ph

Control.Dispose Method

System.Web.UI Namespace   Control Class


Enables a control to perform final cleanup before it is released from memory.

[ Visual Basic ]
Overridable Public Sub Dispose ( ) Implements IDisposable.Dispose

[ C# ]
public virtual void Dispose ( );

[ C++ ]
public: virtual void Dispose ( );

[ JScript ]
public function Dispose ( );

Remarks

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

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

See Also

Control Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph