Android Context Memory Leak ListView due to AudioManager

后端 未结 8 1820
走了就别回头了
走了就别回头了 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:48

    The most common reason that I found in my application was due to initializing some components via the XML file. When you do that, the Activity Context gets injected but sometimes all you need is an ApplicationContext. With respect to the Web View in Android, this technique greatly helped me a lot.

提交回复
热议问题