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


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


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.


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


  • 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.