Android Surfaceview Threads and memory leaks

后端 未结 2 1599
青春惊慌失措
青春惊慌失措 2021-02-04 15:55

Im creating a game in android, and i noticed that the game has a memory leak. Iv managed to isolate the memory leak into a smaller application so that i can see well try and wor

2条回答
  •  故里飘歌
    2021-02-04 16:57

    You should not create new Thread in the constructor when you are creating it in onSurfaceCreated. Compare your code to my example: How can I use the animation framework inside the canvas?

提交回复
热议问题