From: Michael Neumann Date: 2004-10-25T03:23:48+09:00 Subject: Re: Forcing a GC run On Mon, Oct 25, 2004 at 03:15:21AM +0900, Michael Neumann wrote: > Hi, > > How can I force that the GC frees all unreferenced objects? Basically > what I want is: > > x = Object.new > xoid = x.object_id > ObjectSpace.define_finalizer(x, proc { puts "recycled" }) > > x = nil this one is missing of course: puts "before GC" > ObjectSpace.garbage_collect > puts "after GC" > p ObjectSpace._id2ref(xoid) Regards, Michael