Axiom.Demos.TechDemo.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
		public virtual void Dispose()
		{
			if ( engine != null )
			{
				// remove event handlers
				engine.FrameStarted -= OnFrameStarted;
				engine.FrameEnded -= OnFrameEnded;
			}
			if ( scene != null )
				scene.RemoveAllCameras();
			camera = null;
			if ( Root.Instance != null )
				Root.Instance.RenderSystem.DetachRenderTarget( window );
			if ( window != null )
				window.Dispose();
			if ( engine != null )
				engine.Dispose();
		}