Alright so I'm new to Libgdx and Game programming in general, and I've got a huge problem.

If I leave my game on, it will start to eat memory, pretty fast at that, until it reaches a point my PC hasn't enough so it forcefully shuts it down (I have 24GB of RAM!!!)

What could be the reason for this, I don't have FPS lag or anything.

  • \$\begingroup\$ Can you maybe show us some code? (Initializations, asset loading, game loop, etc.) \$\endgroup\$ – Ahmet Zambak Nov 24 '15 at 18:58
  • \$\begingroup\$ pastebin.com/LTWLp2wJ this is my main screen, do you see anything here? \$\endgroup\$ – GigaNova Nov 24 '15 at 19:05

Looks like making a new SpriteBatch ever update wasn't such a smart idea of me!

Lesson learned!

| improve this answer | |
  • 1
    \$\begingroup\$ You're also creating a new Texture every update, line 281. :) \$\endgroup\$ – Chris Mills-Price Nov 24 '15 at 19:30
  • \$\begingroup\$ Yeah I moved those to show and now it only uses 78mb of RAM! \$\endgroup\$ – GigaNova Nov 24 '15 at 19:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.