Do you UN register the observers in onDestroy?

06.10.2011 17:16, Ori Harel пишет:
In my activity, I have about 10 ContentObservers registered to the ContentResolver (registerContentObserver). I do it in the onCreate().

When changing between landscape and portrait, the onCreate() is called over and over again (and I want it that way - need to change layouts), but after few tries the app runs out of memory and crashes.

Those observers are not class members so they live in the scope of onCreate().

Any idea anyone?

(When I comment all registrations, I don't have any crashes).
--
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

--
Kostya Vasilyev

--
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

Reply via email to