Jump to content

Can texture atlases cause memory leaks?


Recommended Posts

Hi all,

I just went through of putting all the single image files of my game into texture atlases. This made my game load and run faster, which was a good thing. I, however, noticed that implementing texture atlases gave me worse results when monitoring my game's memory usage with Google's Timeline tool. Before this the memory usage of my game was quite steady but now it goes up and up every time I switch from Main Menu -state to Game-state and back repeatedly. It never comes back down like it used to.

Is there any differences in the way memory/cache works if I create sprites from single image files or atlases? Currently I'm destroying everything using shutdown but it seems that these sprites created from atlases doesn't get fully destroyed. To destroy a sprite I'm doing this.sprite.destroy();

If someone could help me with this, I'd really appreciate it. I was just making final optimizations for my game and now this is causing me some unwanted memory leaks.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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