Jump to content

State change memory usage


Recommended Posts

My game has two main states - the level map and the actual level gameplay state.
When switching from the map to the gameplay state, memory usage goes up by around 10mb. If I switch back and forth between the map and the gameplay state, memory usage goes up and up until the browser runs out of memory.

I have added a shutdown function to each of these states and cleaned up everything that is created by the states create function. I think I am cleaning things up properly anyway, I'm calling destroy() on all sprite objects and groups and then setting them to null.

What could be causing this?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...