I'm currently having some memory issues. Everytime when restarting my (nape + starling) state the memory uses increases, resulting in the following error:
Error #3691: Resource limit for this resource type exceeded.
Although there are lots of topics about memory management, I havent seen one specific for the Citrus Engine. So lets just share some tip and tricks here
Some I found out (please correctly me if im wrong)
- Destroy all instances within your object in the destroy method
- Create some static textures, so it will only be loaded once into the GPU
- Keep you spritesheets as small as possible
- avoid creating new instances of same objects in a gamestate
- Remove event listeners on fixtures that you are listening to contact events on
What are experiences with memory usage?
And what is a healthy memory number? My game has 60fps an +/- 60MEM..
Let me know.. thanks!