Bug? Activity Memory Leak?

Jack Cole

Well-Known Member
Licensed User
Longtime User
I am having trouble with memory leaks. I have one app with millions of installs. There are thousands of out of memory errors daily tracked on Google Analytics. Many of these, I was able to reduce. However, there are still significant problems.

In investigating the issue, there is a loss of 2 to 3K of free memory when orientation changes or a new activity is loaded and then closed.

I have attached a simple example. Switching orientation over and over eventually leads to a forced close with an out of memory error.

The attached example needs the VBBitmap library.

Is this an Android problem or something that could be improved in the generated java code?

Best regards,
Jack
 

Attachments

  • memerror.zip
    445.5 KB · Views: 249

Jack Cole

Well-Known Member
Licensed User
Longtime User
Thanks Erel. It seems to be related to the layout animations. Disabling that seems to take care of the leak on my test devices. I do like the animation. Any ideas on how to be able to use those without it causing a problem?
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
Droid Razr HD with 4.4.2. It also occurs on Kindle Fire HD.

Here is an example with the app example running on the Fire HD. In the log below, you see what happens when I change orientation.


Here is what it does with the animation turned off on the layout. Does not have the leak.

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…