From: matz@... (Yukihiro Matsumoto) Date: 2001-06-27T00:53:31+09:00 Subject: [ruby-talk:16908] Re: finalizers, destructors and whatnot Hi, In message "[ruby-talk:16888] finalizers, destructors and whatnot" on 01/06/26, "David Leal" writes: |include ObjectSpace | |define_finalizer( obj, proc { |id| _id2ref( id ).close } finalizers are called AFTER object deallocation. It's too late to call _id2ref(). Typical use of finalizers can be seen in tempfile.rb And properly designed C extension provides their own finalizers, so that you don't have to care about by youself. matz.