GraphicsDevice.Disposing Event

Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

public event EventHandler<EventArgs> Disposing

Remarks

IsDisposed indicates whether an object has been disposed.

Example

To add an event handler that listens for Disposing, use the following C# code.

      [C#]
      obj.Disposing += new System.EventHandler( this.OnDisposing );

See Also

Reference

GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP