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 (in microsoft.xna.framework.dll)

public event EventHandler Disposing

IsDisposed indicates whether an object has been disposed.

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

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

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions