In Android you never really close a screen.
The system will --- when it feels necessary --- destroy the activity:
this sets its master view to null and at that point the view will be
garbage collected (eventually).
This is a core concept in Android: your application doesn't close
the same way it does on a desktop. There are always things that you
have to watch out for: in this case the salient detail is not to keep
`Views` in static objects. (This will cause your app to leak views
when they *are* destroyed and recreated, say by a reconfiguration when
the user rotates the screen.)
Kris
On Thu, Feb 14, 2013 at 11:00 AM, Fábio Balancin balan...@gmail.com wrote:
Hello,
I'm working on android project with XML layout and I have a little (but
despicable) problem.
When I set one activity with xml layout using a layoutInflater (i'm in
fragment) I close this activity and load it again, then Android heap not
release all objects of memory, and I have a little bytes more on each
reload. Doesn't GC working correctly ? How I fix that ?
My Android Device is a 2.3 version.
Thanks !!
--
Fabio Balancin
System / Game Engineer
Phone: +55 11 9891 3045
E-mails:
balan...@gmail.com
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an
email to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.