I found that PhysicsSpace class has issues in destroy() method.
When destroy() is called then not all stuff is cleared (tickListeners, CharacterControls, physicsGhostObjects, collisionGroupListeners, etc).
The destroy method is only there to be able to call the bullet destroy method, the objects only get removed because bullet removes these from the physics space and native crashes if they het garbage collected instead.
@normen said:
The destroy method is only there to be able to call the bullet destroy method, the objects only get removed because bullet removes these from the physics space and native crashes if they het garbage collected instead.
Can we clear Listeners? Will there be a crash if clear all of them?