Re: Threads preventing garbage collection?



Ara Howard wrote:
but that it expected? you have a Foo which referes to a Thread which
has not died that is itself referred to by the global Thread.list

cfp:~ > ruby -e' 41.times{ Thread.new{ sleep } }; p Thread.list.size '
42

Foo ------------>
thread
thread list ---->

I don't think this should prevent garbage collection of Foo, if nothing
is holding a reference to Foo
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • Re: Deleting an anonymous function
    ... results in the function formerly referred to as foo becoming anonymous ... arguments object belongs on to the execution context, ... It has the property DontEnum, ... the function is made available for garbage collection. ...
    (comp.lang.javascript)
  • Re: Symbol pollution non-issue.
    ... Kaz Kylheku wrote: ... garbage collection time, if the only reference to a symbol is via its ... (defvar foo 3) ... create a reference to the symbol FOO. ...
    (comp.lang.lisp)
  • Re: How to destroy arrays
    ... > garbage collection. ... When a is an array reference, ... > So, in my example, because Foo is not used after ... >> which Scott did not write). ...
    (microsoft.public.dotnet.general)
  • Re: Object instantiation in C#
    ... > - If I use 'new' to instantiate an object, but the reference variable I use ... an instance of A that we will call Foo ... to an instance of B that we will call qwerty ... // Foo is NOT eligible for garbage collection ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: async behaviour, factories and object ownership
    ... >so we let foo have an Completed event so.... ... >because it defeats the garbage collector..but then garbage collection ... GC is not a myth... ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)