From: Nat Pryce Date: 2001-08-12T10:37:34+09:00 Subject: [ruby-talk:19562] Re: Forced garbage collection From: "Lars Christensen" > I am testing some code that uses ObjectSpace#define_finalizer, but I can > not force objects to be garbage collected using GC.start or > ObjectSpace.garbace_collect. I've been having the same problem with Ruby 1.6.4. trying to implement a weak hash. If my unit tests call ObjectSpace.garbage_collect or GC.start, finalizers don't get called (I cannot tell if garbage collection has actually happened or not). When the program exists, finalizers do get called.