How to Fix Android Lollipop Memory Leak (for Android 5.0.x)
A module to get rid of the Android 5.0.x ColorFade memory leak bug that's driving me nuts.
As Xposed still isn't compatibe with 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.
Update: I just heard that an unofficial test version for 5.1 is just around the corner
The leak apparently happens due to the Screen Off animation not releasing it's ressources, I followed the officialAndroid 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:
Quote:
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
There's really NO NEED to use it on custom ROMs like CM12, they already applied the patch in question.
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.
I did only test the module for 24 hours to make sure it doesn't cause any problems.
To validate if this truly helps in regards to the memory leak a significantly higher testing time is required, so post your results!
- Source Code: https://github.com/tonyp/FixLollipopMemoryLeak
- Google+: Click to post your comments at Google+
http://mrad4tech.blogspot.com/p/how-to-download-from-adfly-ads.html
0 comments: