Fix Lollipop Memory Leak (for Android 5.0.x)
ZitatAlles anzeigenA module to get rid of the infamous Android 5.0.x ColorFade memory leak bug.
As Xposed still didn't receive an official update for Android 5.1 I hope this can make the wait a little bit easier.
Same goes for those poor fellas who didn't receive a 5.1 update, yet.The leak apparently happens due to the Screen Off animation not releasing it's ressources, I followed the official Android 5.1 patch for the Xposed Module.
For those who don't know what I'm talking about:
- Android Police: Notorious Lollipop Memory Leak That Caused App Crashes Finally Fixed After Over 1750 Stars In Issue Tracker
- XDA Portal: Google Fixes Lollipop Memory Leak, Android 5.0.3 Incoming?
- Reddit: Biggest lollipop issue now marked "future release" - Issue 79729
- AOSP issue tracker: Issue 79729: Memory Leak on Lollipop crashing Apps
For a more technical explanation read e.g. Stackoverflow:
Yes -- in fact it is highly desireable to detach and delete your shader objects as soon as possible. That way the driver can free up all the memory it is using to hold a copy of the shader source and unlinked object code, which can be quite substantial. Measurements I have done indicate that NOT deleting the shader objects increases the incremental memory use per shader by 5-10x
This module is intended to be used with AOSP and GPE ROMs, I have no idea if vendors like LG, HTC etc. already changed/fixed the method in question.
Based on feedback from this thread it has positive effects on Motorola and LG devices, too.
There's really no need to use it on up2date CM12 nightlies, they already applied the patch in question.
I don't know about other custom ROMs, ask your ROM maintainer about it.Additionaly keep in mind that there are more memory leaks in Lollipop (although this might be the worst one?).
Google fixed a couple ones with Android 5.1 but still missed at least a major one.
While memory leaks are quite common and probably happen to some extent in pretty much all software releases it seems as if Google has been quite sloppy in that field lately.The module is open source, so you can validate the code and possibly send me pull requests.
Update: So far the feedback for this module has been nothing but positive.
It seems like this module truly benefits devices with Android 5.0
Changelog
"Klick mich ..."
v1.1:
- Minor code improvements (thanks @kmark!)
- Added settings interface
- Published at Google Play
v1.0:
- initial release
- Download: Fix Lollipop Memory Leak @ Google Play Store
- Download: Fix Lollipop Memory Leak @ Xposed Module Repository
- Source Code: Stackoverflow
- Google+: Click to post your comments at Google+
Quelle