Android Context Memory Leak ListView due to AudioManager

后端 未结 8 1832
走了就别回头了
走了就别回头了 2020-12-15 05:24

I have a ListView and I would expect it to be cleared from memory when the activity finishes. However, it appears that it is leaking. When I check the Memory Du

8条回答
  •  眼角桃花
    2020-12-15 05:38

    If your application crashes for memory leak, then you can avoid this crash using try - catch(java.lang.outofmemory). The fact is that GC is called by JVM itself, so programer has no control on this. You can install your application in SD card, in this case SD card memory will be used. Memory leak will not occur.

    Just go to your manifest file, there must be version no. version name, there also must be " Install Location" , make it "preferExternal".

提交回复
热议问题