So, just for clarity:bartbes wrote:Alright, let's just end all this:
For both destroy() and the GC to function, all shapes, contacts and other associated things have to be released as well.
Then, the difference between destroy() and the GC: destroy() is there to force removal at that specific time, the GC may take some longer.
As for the crashes: If you destroy an object that is still colliding Box2D won't like it, which is why moving it outside of the world, or setting it to no longer collide solves this problem.
To destroy a body you also have to destroy the shape beforehand, otherwise it's just pretending to be destroyed, right? And before you do that you should put the body somewhere remote so nothing is colliding with it, or set the mask to every category used.