Android – my application leaked randomly shaped bitmaps that are not in my drawable folder

I have a strange memory leak problem. My application keeps leaking bitmap objects and other related objects, such as vectordrawables and animationdrawables

Through eclipse memory analyzer and gimp, I can recover leaked bitmap objects and find that they are random shapes of stars, squares or circles. There are no such shapes in my RES / drawable folder

Where do they come from and why do they leak so much? This leak occurred on my Samsung Galaxy S7 – Android 7.0 and Android 7.0 and 6.0 simulators. However, when I ran my application on Huawei running Android 4.4.4, there was no leak

Invalid Sign

Screenshot of the domino tree in memory analyzer

They are marked in yellow, such as the stars at the bottom of this picture

Star bitmap found in my leak

In addition, my stack trace keeps spitting out these lines endlessly

 03-21 17:00:08.415 16747-16747/muddzdev.shoppist I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
    03-21 17:00:08.428 16747-16760/muddzdev.shoppist D/InputTransport: Input channel constructed: fd=98
    03-21 17:00:13.315 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:13.632 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:13.914 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:14.257 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:14.592 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:14.933 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled
    03-21 17:00:15.299 16747-16886/muddzdev.shoppist E/OpenGLRenderer:   saveGfxinfoFileDisabled enabled

resolvent:

After updating to API 24, I encountered the same problem as S7. I can remove this error by disabling GPU monitor in Android studio. It seems that it must be an Android studio problem, maybe only S7

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>