Nat Pryce wrote: > From: "Sean O'Dell" <sean / BUHBYESPAMcelsoft.com> > >>Finalizers don't cut it for me. Proper object destruction requires >>special tasks much of the time (freeing memory, closing files, etc.). A >>proper destructor is helping keep the function of the object >>encapsulated. It's an exit routine. Last I heard, finalizers were >>called when the object was already gone...so you can't much in the way >>of closing anything or freeing anything that the object was >>maintaining...it's just not the same thing. >> > > This is a common complaint from people used to C++ or Java, probably because > they are not used to a language with proper closures. This page on the Ruby > Garden wiki explains how to use finalisers to clean up an object's private > state: > > http://www.rubygarden.org/ruby?DiscussionOnUsingFinalizers Yeah, I know...it's not the same thing. I hope we get real destructors one day. Sean