From: ts Date: 2002-11-01T00:03:19+09:00 Subject: Re: define_finalizer does NOT work >>>>> "a" == ahoward writes: a> thus, there is no way to impliment the following logic : a> if being_garbage_collected a> self.free self.a_resource a> end No way, but if you think to the GC you'll see that it's a Good Thing (TM) Imagine that your method re-activate the object when ruby try to garbage it. a> this seems unfortunate, though i have not yet come across a definite need for a> it in ruby, i have used a similar technique in perl before to decrement a a> counter in a multi-threaded application Well, perl don't have a real GC. If I remember it correctly, matz has made *volontary* the choice to make *difficult* to use such technique because they are too error prone. Guy Decoux