/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { //if (mSoftRigidDynamicsWorld != null) mSoftRigidDynamicsWorld.Dispose(); if (discreteDynamicsWorld != null) { discreteDynamicsWorld.Dispose(); } else if (collisionWorld != null) { collisionWorld.Dispose(); } if (broadphase != null) { broadphase.Dispose(); } if (dispatcher != null) { dispatcher.Dispose(); } if (collisionConfiguration != null) { collisionConfiguration.Dispose(); } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { //if (mSoftRigidDynamicsWorld != null) mSoftRigidDynamicsWorld.Dispose(); if (discreteDynamicsWorld != null) { discreteDynamicsWorld.Dispose(); } else { collisionWorld?.Dispose(); } broadphase?.Dispose(); dispatcher?.Dispose(); collisionConfiguration?.Dispose(); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { //if (mSoftRigidDynamicsWorld != null) mSoftRigidDynamicsWorld.Dispose(); if (discreteDynamicsWorld != null) { discreteDynamicsWorld.Dispose(); } else { collisionWorld?.Dispose(); } broadphase?.Dispose(); dispatcher?.Dispose(); collisionConfiguration?.Dispose(); BulletSharp.PersistentManifold.ContactProcessed -= PersistentManifoldContactProcessed; BulletSharp.PersistentManifold.ContactDestroyed -= PersistentManifoldContactDestroyed; }