How to Fix Android Lollipop Memory Leak (for Android 5.0.x)

11:24 0 Comments



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:


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
This module is intended to be used with AOSP ROMs, I have no idea if vendors like LG, HTC, Motorola etc. already changed/fixed the method in question.
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! 




http://mrad4tech.blogspot.com/p/how-to-download-from-adfly-ads.html

Unknown

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 comments: