public void Dispose() { Vertices.Dispose(); Indices.Dispose(); }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> private void Dispose(bool disposing) { if (_disposed) { return; } if (!disposing) { return; } if (Screen != null) { Screen.Dispose(); Screen = null; } if (Indices != null) { Indices.Dispose(); Indices = null; } if (Vertices != null) { Vertices.Dispose(); Vertices = null; } if (Layout != null) { Layout.Dispose(); Layout = null; } if (PixelShader != null) { PixelShader.Dispose(); PixelShader = null; } if (VertexShader != null) { VertexShader.Dispose(); VertexShader = null; } if (Graphics != null) { Graphics.Dispose(); Graphics = null; } if (_form != null) { _form.Dispose(); _form = null; } _disposed = true; }