/// <summary> /// Disposes of object resources. /// </summary> /// <param name="disposeManagedResources">If true, managed resources should be /// disposed of in addition to unmanaged resources.</param> protected virtual void Dispose(bool disposeManagedResources) { if (disposeManagedResources) { apiContext.Dispose(); if (Form.IsDisposed == false) { Form.Dispose(); } Fps.Dispose(); MeshFactory.Dispose(); PhysicsContext.Dispose(); } }