예제 #1
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);

            TerrainRenderer.Dispose();
            FontDrawing.Dispose();
            MainFont.Dispose();
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                if (disposing)
                {
                    // Dispose managed resources.
#if !XBOX360
                    TerrainRenderer.Dispose();
#endif
                    MeshRenderer.Dispose();
                    _decalRenderer.Dispose();
                    AlphaBlendSceneRenderer.Dispose();
#if !XBOX360
                    _terrainClipmapRenderer.Dispose();
#endif
                    _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;
            }
        }