EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

fix memory leak in Demo "falling" #692

Closed aligator closed 4 years ago

aligator commented 4 years ago

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.

Noofbiz commented 4 years ago

Awesome! Thanks for your contribution!