Stopping a thread does not necessarily garbage collect them...

Put your references to your background threads/async-tasks inside an
object that you pass back with onRetainNonConfigurationInstance and
call getLastNonConfigurationInstance in your onCreate().

If the android getLastNonConfiguration returns the object (the object
you returned in onRetainNonConfigurationInstance), get the references
to your background threads and assign the current activity to these
threads where it is necessary.

In the onDestroy(), get the references to your background threads and
assign 'null' to the parts where references to your activity can be
held.

BTW: I think that a Handler() does not hold a reference to an activity-
context.

On Jun 18, 2:06 am, Nathan <critter...@crittermap.com> wrote:
> After thinking I made a major breakthrough by stopping that thread, I
> still find that Activity Instances stack up.
>
> I'll still need to analyze all the inner classes.
>
> Nathan

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