2012/11/2 Latimerius <[email protected]>

> On Fri, Nov 2, 2012 at 6:15 PM, Kostya Vasilyev <[email protected]>
> wrote:
> > Hold on a second.
> >
> > Calling start() on a thread surely keeps a reference somewhere that would
> > prevent the thread from being GC'd while it's still running.
>
> I would hope it doesn't but this is Java so yeah, possibly.
>

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.mat.ui.help%2Fconcepts%2Fgcroots.html

>>>
Garbage Collection Roots
A garbage collection root is an object that is accessible from outside the
heap. The following reasons make an object a GC root:

.... snip ...

Thread
A started, but not stopped, thread.
<<<

Also see this:

http://stackoverflow.com/a/2423293

-- K


>
> One thing I know though is that the GC is quite happy to collect for
> instance an active MediaPlayer if you don't keep a reference to it -
> and this is a much higher-level class where behind-the-scenes
> global/static bookkeeping is more likely than with a simple low-level
> Thread class...
>
> --
> 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
>

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

Reply via email to