Sign in to follow this  

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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.