protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { // Dispose managed resources. SpriteBatch.Dispose(); MeshRenderer.Dispose(); _decalRenderer.Dispose(); AlphaBlendSceneRenderer.Dispose(); _cloudMapRenderer.Dispose(); _waterWavesRenderer.Dispose(); _sceneCaptureRenderer.Dispose(); _planarReflectionRenderer.Dispose(); _shadowMapRenderer.Dispose(); _shadowMaskRenderer.Dispose(); LightBufferRenderer.Dispose(); _lensFlareRenderer.Dispose(); _skyRenderer.Dispose(); _fogRenderer.Dispose(); _internalDebugRenderer.Dispose(); Scene.Dispose(false); PostProcessors.Dispose(); DebugRenderer.Dispose(); } // Release unmanaged resources. IsDisposed = true; } }
public void Dispose() { _spriteBatch.Dispose(); _meshRenderer.Dispose(); _decalRenderer.Dispose(); _billboardRenderer.Dispose(); AlphaBlendSceneRenderer.Dispose(); _shadowMapRenderer.Dispose(); _shadowMaskRenderer.Dispose(); LightBufferRenderer.Dispose(); _lensFlareRenderer.Dispose(); _skyRenderer.Dispose(); _fogRenderer.Dispose(); _internalDebugRenderer.Dispose(); Scene.Dispose(false); PostProcessors.Dispose(); DebugRenderer.Dispose(); }