Dispose Method

SoundEffect.Dispose Method

Releases the resources used by the SoundEffect.

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

public void Dispose ()

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

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone

Community Additions

© 2016 Microsoft