开发者

Handling out of memory exception

I am devloping a mobile game..In that i got out of memory Exception in exit when playing multiple times..Some of friends said it is due memory allocation so clear the memory.. i clear all the memory allocated for tiled layer, sprite etc at each and every level as well as开发者_StackOverflow社区 while exit..

I stop the Thread also at the time of exit. I am handling the Thread to stop in two ways that is given a boolean value in while within the run method and in exit change the boolean value to false and next one before exit calling the thread.interrupt and make a thread to null..


it is hard to tell where the problem is but I suggest to use a memory profiler to catch the problem, Java ME SDK has one and the Nokia S40 emulators also have a very powerful profiler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜