1

我的 android 应用程序中存在内存泄漏,这似乎是由 AppCompat 活动存储启动活动的上下文并且从不释放它的方式引起的。

Class Name                                                                        | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap
----------------------------------------------------------------------------------------------------------------------------------------------------
class android.view.WindowManagerGlobal @ 0x712c48c8 System Class                  |            1 |          112 |               280 |           968
'- sDefaultWindowManager android.view.WindowManagerGlobal @ 0x32cf52e0            |            1 |           32 |               280 |           312
   '- mViews java.util.ArrayList @ 0x32cf41d8                                     |            1 |           24 |               280 |            80
      '- elementData java.lang.Object[10] @ 0x32cb0bd8                            |            1 |           56 |               280 |            56
         '- [0] com.android.internal.policy.DecorView @ 0x32e80400                |            1 |          800 |               280 |         2,368
            '- mContext android.view.ContextThemeWrapper @ 0x32f70500             |            1 |           32 |               280 |            32
               '- mBase LeakedActivity @ 0x32d44780|            1 |          280 |               280 |         4,144
----------------------------------------------------------------------------------------------------------------------------------------------------

那么我这边有什么可能导致它吗?

4

0 回答 0