pub unsafe extern "C" fn PxPhysics_release_mut(self_: *mut PxPhysics)
Expand description

Destroys the instance it is called on.

Use this release method to destroy an instance of this class. Be sure to not keep a reference to this object after calling release. Avoid release calls while a scene is simulating (in between simulate() and fetchResults() calls).

Note that this must be called once for each prior call to PxCreatePhysics, as there is a reference counter. Also note that you mustn’t destroy the PxFoundation instance (holding the allocator, error callback etc.) until after the reference count reaches 0 and the SDK is actually removed.

Releasing an SDK will also release any objects created through it (scenes, triangle meshes, convex meshes, heightfields, shapes etc.), provided the user hasn’t already done so.

Releasing the PxPhysics instance is a prerequisite to releasing the PxFoundation instance.