From: Timothy Hunter Date: 2005-06-18T07:30:33+09:00 Subject: Re: What's the correspond method of PERL's DESTROY in ruby Yi Zhang wrote: > What's the corresponding method of PERL's DESTROY in ruby? Generally speaking there is no equivalent. Like Perl, Ruby's garbage collection cleans up unreferenced objects without any intervention. If you want do something to clean up an external resource at the point when you're finished using the instance, the cooresponding Ruby idiom is to use a block. Check out http://www.rubygarden.org/ruby?RubyIdioms.