drewaburden / resume

Résumé Quest
http://drewaburden.github.io/resume/
1 stars 0 forks source link

CPU and memory increases when paused #22

Closed drewaburden closed 10 years ago

drewaburden commented 10 years ago

Potential memory leak caused when the game is paused. If the game is unpaused (before the memory runs out), the CPU and memory usage drops back down. This needs to be investigated.

drewaburden commented 10 years ago

Definitely a memory leak.

drewaburden commented 10 years ago

It appears to have something to do with the PauseOverlay

drewaburden commented 10 years ago

Disposing the ShapeRenderer immediately after using it seems to have stopped the memory leak, but CPU is still higher than it probably should be.

drewaburden commented 10 years ago

For some reason, ShapeRenderer is just very CPU and memory intensive. Moral of the story, for easy things like an overlay, just use a 1x1 pixel Sprite stretched to fit the screen. Don't use ShapeRenderer (unless it's for debug).