简体   繁体   中英

Java libgdx program not returning allocated Memory

I am running a program in java ( Eclipse ) with the libgdx library. Now I am at the point where I realized that when the program was running for about a minute the FPS drops from solid 60 to bouncing from 10 to 40. Also the allocated Memory from the program is rising constantly. But the Heap size is seemingly not rising.

My question is now why the application is not returning the allocated memory to the OS ( windows ) and if there is a correlation between allocated memory and FrameRate.

Here is a link to a picture of an extract from the jconsole data:

http://de.tinypic.com/view.php?pic=jj9z6u&s=5#.UtFp9bSFd7s

( Stack overflow prevents me from uploading pictures directly... )

You are probably creating a lot of garbage for the garbage collector to collect.

Use the heap analysis tools in Eclipse or in the ADT to debug the issue. See http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html for ideas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM