When I call removeSelf() on a display object, does that take care of removing the physics body as well or do I need to that myself by calling physics.removeBody() an top?
No, removeSelf() on a display object which has a physics body will remove both.
The only time you need to be careful with this sort of thing is when you’re holding a reference to the object elsewhere, but that is a general memory management requirement. Display objects will not get removed when calling removeSelf() on them if you do not get rid of their variable. This applies whether physics is involved or not.
Great to hear. Thank you!
No, removeSelf() on a display object which has a physics body will remove both.
The only time you need to be careful with this sort of thing is when you’re holding a reference to the object elsewhere, but that is a general memory management requirement. Display objects will not get removed when calling removeSelf() on them if you do not get rid of their variable. This applies whether physics is involved or not.
Great to hear. Thank you!