NewtonDestroyCollision

From Newton Wiki
(Redirected from NewtonReleaseCollision)
Jump to: navigation, search

NewtonDestroyCollision

void NewtonDestroyCollision( const NewtonWorld* newtonWorld, const NewtonCollision* collisionPtr)

Usage

Release a reference from this collision object returning control to Newton. Whenever the reference count for the collision reaches zero, the collision will be freed and newton will call the NewtonCollisionDestructor callback.

Parameters

  • const NewtonWorld *newtonWorld - is the pointer to the Newton world.
  • const NewtonCollision *collisionPtr - pointer to the collision object

Remarks

  • Collision objects are reference counted objects. The application should call NewtonDestroyCollision in order to release references to the object. Neglecting to release references to collision primitives is a common cause of memory leaks.