This PR fixes a memory leak. Each stone adds itself as references to the RenderSystem, FallingSystem and CollisionSystem. All references of them were never removed.
The remove-functions were implemented (not completely...) but never called.
So I extended it to remove all corresponding references and call it when the stones reach the bottom.
This PR fixes a memory leak. Each stone adds itself as references to the RenderSystem, FallingSystem and CollisionSystem. All references of them were never removed. The remove-functions were implemented (not completely...) but never called.
So I extended it to remove all corresponding references and call it when the stones reach the bottom.