Hi Jiri, Static references remains on memory until the process where your activity is running is destroyed.
So, in order to avoid memory leaks, point the reference to null in onDestroy() Regards, Felipe Silveira On Thu, Sep 24, 2009 at 10:58 AM, Jiri <[email protected]> wrote: > > I have a simple question, in my ctivity i define a static private as so: > > private final FileFetcher ff = new FileFetcher(); > > what happens when this activity is destroyed, is the reference to the > FileFetcher completly gone, and can everything be marked for GC? > > Or would it better to write > > private FileFetcher ff; > > and the in my onCreate instantiate the FileFetcher and nullify it in the > onDestroy method? > > Jiri > > > > -- Felipe Silveira Engenharia da Computação Universidade Federal de Itajubá http://www.felipesilveira.com.br MSN: [email protected] Skype: fsunifei ------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

