From: Michael Neumann Date: 2004-10-25T03:15:21+09:00 Subject: Forcing a GC run 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 ObjectSpace.garbage_collect puts "after GC" p ObjectSpace._id2ref(xoid) What I get is: before GC after GC # recycled Where I'd have expected: before GC recycled after GC -> exception RangeError Any hints? Regards, Michael