Compartir a través de


DynamicRenderer.Dispose Method

DynamicRenderer.Dispose Method

Releases all resources used by the object.

Definition

Visual Basic .NET Public Sub Dispose()
C# public void Dispose();
Managed C++ public: void Dispose();

Remarks

Calling the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method allows the resources used by the object to be reallocated for other purposes. For more information about garbage collection, see Programming for Garbage Collection Leave Site.

Caution: To avoid a memory leak you must explicitly call this method on any object or control in the Microsoft® Windows® XP Tablet PC Edition Software Development Kit (SDK) to which an event handler has been attached before the object or control goes out of scope.

For any class in the Tablet PC SDK on which the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method is defined, manually dispose of each instance of that class when it is no longer needed. Disposing of these objects improves your application's performance.

When overriding the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method in a derived class, call the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method of the base class so that the object's resources are properly released.

When the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) parameter is true, this method releases all resources held by any managed objects that this object references. This method invokes the Dispose Leave Site method of each referenced object.

Note: to Inheritors The Dispose method can be called multiple times by other objects. When overriding the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method, be careful not to reference objects that have been previously disposed of in an earlier call to Dispose. For more information about how to implement the frlrfmicrosoftstylusinputdynamicrendererclassdisposetopic (no caption;) method, see Implementing a Dispose Method Leave Site.

For more information about garbage collection, see Programming for Garbage Collection Leave Site.

See Also