That should take care of itself. Initially only the Android system has a 
reference to that object of an internal class type (e.g. and  Activity 
object. That reference is effectively a bridge. (Call it 'refB'). 
The object of an Android internal type can in turn have references to other 
objects but as soon as Android  cuts that bridge all those other objects 
become unreachable and fair game for garbage collection. Where you get in 
trouble is if you give 'refB' to another object so that it is no longer a 
bridge. So, for instance don't give a reference of your activity to a 
service. Listeners are not a problem since the when you register the 
listener it is the widget that has a reference to the listener (not the 
listener having a reference to the widget) 

On Friday, June 8, 2012 5:18:57 AM UTC-4, marcin kolonko wrote:

> as of now, i set all class members to null, but do nothing inside classes 
> i extended, like listeners or adapters or anonymous classes.
>
> would that be enough?
>

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