IndexBuffer.Dispose Method
Immediately releases the unmanaged resources used by this object.
Overload List
Name | Description |
---|---|
IndexBuffer.Dispose (Boolean) | Immediately releases the unmanaged resources used by this object. |
Remarks
Call Dispose when you are finished using the IndexBuffer. The Dispose method leaves the IndexBuffer in an unusable state. After calling Dispose, you must release all references to the IndexBuffer so the garbage collector can reclaim the memory that the IndexBuffer was occupying.
Note
Always call Dispose before you release your last reference to the IndexBuffer. Otherwise, the resources it is using will not be freed until the garbage collector calls the IndexBuffer object's Finalize method.
See Also
Reference
IndexBuffer Class
IndexBuffer Members
Microsoft.Xna.Framework.Graphics Namespace