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 ( );
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.
Control Members