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.


closed as off-topic by Josh Nov 24 '15 at 19:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\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!

  • 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.