From: Wim van den Bos Date: 2005-04-10T18:42:45+09:00 Subject: Re: ruby 1.8.3 preview1 plan Ok, but I would expect after assigning a nill, and calling the GC explicitely that it released memory :-( Nothing links to the object anymore. (I use big C++ objects coupled with Ruby classes, so the ruby-side is very small) I changed the simple example to: #==================== class Example end 1.times { # << added this a=Example.new p ObjectSpace.each_object(Example) { } } GC.start p ObjectSpace.each_object(Example) { } #==================== It prints 1 and 0 Then the GC kicked in :-) , probably because of the scope? If 1.times { ... } is leaved out it prints 1,1. Is there any trick to enforce the GC to release memory? ----- Original Message ----- From: To: Sent: Sunday, April 10, 2005 8:40 AM Subject: Re: ruby 1.8.3 preview1 plan > Hi, > > At Fri, 8 Apr 2005 22:13:54 +0900, > wvdbos@goudappel.nl wrote in [ruby-core:04680]: > > Did you look at the GC problem I wrote about some time ago? > > > > In case the message is gone here it i again: > > GC doesn't guarantee that an object will be collected as soon > as it gets unreferred. > > -- > Nobu Nakada >