Surface.Disposing Event

Language:

Warning: This event is deprecated. Deprecated components of Microsoft DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Occurs when the Dispose method is called or when the object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime. Deprecated.

Definition

Visual Basic Public Event Disposing As EventHandler
C# public event EventHandler Disposing;
C++ public:
event EventHandlerDisposing;
JScript In JScript, you can use events, but you cannot define your own.

Remarks

To add an event handler that listens for a Surface.Disposing event, use the following code.

surface.Disposing += new System.EventHandler(this.OnDisposing);

The Disposed property of an object indicates whether that object has been disposed.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center