Coder Social home page Coder Social logo

Comments (5)

SimonMarquis avatar SimonMarquis commented on July 30, 2024

I don't see any issue here. ViewHolders are retained since Activity doesn't seem to be destroyed in the usecase you're describing.
Are these objects retained after you quit the app with the back button?

from android-preferencesmanager.

Robigus92 avatar Robigus92 commented on July 30, 2024

I have developed an automated Memory Leak detection tool which test Activities executing different lifecycle events (rotations, background-foreground, dialog pop-up events) then forcing an ending Garbage Collection.

The idea is that if the activity lifecycles are well managed there should not be an increase of the used heap memory.

In AppListActivity, forcing the BF (Background-Foreground) events, it seems to be an increasing trend of those TextView. It means that BF events cause an increase of TextView objects in heap memory.

The designed Background-Foreground event works switching from an activity to another, involving the Activity's onStart-onStop lifecycle.

from android-preferencesmanager.

SimonMarquis avatar SimonMarquis commented on July 30, 2024

Unfortunately the Adapter is always re-created (instead of updating it's internal data), that's the reason why you see doubled instances of ViewHolders.
But since I don't think the Adapter instance is retained anywhere except in the Activity, it won't be a memory leak.
Maybe you have more details about the retained cycles of these objects?

from android-preferencesmanager.

Robigus92 avatar Robigus92 commented on July 30, 2024

Have you considered to use a Loader instead of managing the listView through AsyncTask?
Loaders should manage lifecycles automatically, avoiding such problems.

https://developer.android.com/guide/components/loaders.html

from android-preferencesmanager.

SimonMarquis avatar SimonMarquis commented on July 30, 2024

Unfortunately this project is no longer maintained and I don't have enough time to invest in this right now.

from android-preferencesmanager.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google âĪïļ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.