Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Large memory leak in fragment? #149

Closed
DanielNovak opened this issue Jul 1, 2013 · 7 comments
Closed

Large memory leak in fragment? #149

DanielNovak opened this issue Jul 1, 2013 · 7 comments

Comments

@DanielNovak
Copy link

This is a strange issue, the code is very simple - I am creating a SpiceManager in a Fragment and starting a request in onResume.
The number of objects is increasing after every orientation change, it seems like the whole activity is leaking. The memory is full after few orientation changes.

Removing .execute from onResume solves this and the heap does not grow on orientation change. But - and now this is very strange - if you remove the ImageView variable and don't assign it, it's also working correctly.
It's only happening in fragments, not in activities.

I am testing on Motorola Xoom 4.1.2. I am using DDMS heap tool.

Here is the simple source code. Build with Maven.
https://dl.dropboxusercontent.com/u/10711500/robospice-leak.zip

@DanielNovak
Copy link
Author

So I tested this on Desire S 2.3.5 and it does not happen... I am working on more tests.

@rciovati
Copy link
Contributor

rciovati commented Jul 1, 2013

If you are able to build RS from source, try checking if the patch above solves the problem.

@DanielNovak
Copy link
Author

I will definitely test this tomorrow (maybe today in the evening) and let you know. Thanks.

@ghost ghost assigned rciovati Jul 9, 2013
@stephanenicolas
Copy link
Owner

@DanielNovak we need some follow up from you. @rciovati I assign the issue to you so that you can feel free to merge needed code, and administrating the issue and related pull requests.

@rciovati
Copy link
Contributor

@DanielNovak ping :)

@DanielNovak
Copy link
Author

@stephanenicolas @rciovati Sorry for the late reply. The 1.6.5 version seems to have fixed this problem - the heap does not grow indefinitely and strict mode warning do not report multiple activities in memory. I think you can close this issue. Thank you.

@stephanenicolas
Copy link
Owner

Issue closed. Thanks for reporting it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants