PrimaryKey wrote: > Hello! > > After reading the Pickaxe book I noticed it provides almost no > information about object lifecycle and no mention of destructors. As a > Java/C# guy my gut reaction was: Wouldn't it be nice to have a > "unintialize" method to be called when the object is being destroyed? > > There seems to be some form of destructor (called finalizers) in the > ObjectSpace module, but it seems to be an afterthought rather that an > integral feature of the language. Not so much an afterthought as discouraged. Here's a good discussion about Ruby's finalizers: http://www.rubygarden.org/ruby?RubyFromCpp