Delen via


Damage.Dispose Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Releases all resources used by the Damage.

Namespace:  Microsoft.Windows.Design.Documents.Trees
Assembly:  Microsoft.Windows.Design.Markup (in Microsoft.Windows.Design.Markup.dll)

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As Damage

instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()

Implements

IDisposable.Dispose()

Remarks

When you call this method, the document is disposed and damage tracking is stopped. The document manager this object produced will no longer reference this object.

Call Dispose() when you are finished using the Damage. The Dispose() method leaves the Damage in an unusable state. After calling Dispose(), you must release all references to the Damage so the garbage collector can reclaim the memory that the Damage was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call Dispose() before you release your last reference to the Damage. Otherwise, the resources it is using will not be freed until the garbage collector calls the Damage object's Finalize method.

.NET Framework Security

See Also

Reference

Damage Class

Damage Members

Microsoft.Windows.Design.Documents.Trees Namespace

Other Resources

WPF Designer Extensibility