Writing a destructor is possible?

I would like to know if it is possible to write (for a class) something
like
a destructor (like you do with C++), or something equivalent.
If it is not possible, how can I do to perform some operations on the
deletion of my object ?

On 2/28/07, Guillaume Nargeot
[email protected] wrote:

I would like to know if it is possible to write (for a class) something like
a destructor (like you do with C++), or something equivalent.
If it is not possible, how can I do to perform some operations on the
deletion of my object ?

Please look in the archives; this was just discussed last week.

In short, you can write a finalizer, but you’ll never use it because
it may not be called. If you must release resources when your object
is destroyed, ensure that you provide a block form (like File.open).

-austin

Please look in the archives; this was just discussed last week.

In short, you can write a finalizer, but you’ll never use it because
it may not be called. If you must release resources when your object
is destroyed, ensure that you provide a block form (like File.open).

-austin

Sorry, but I don’t know were to find these archives… I thought I found
them on the internet, but I didn’t find anything into them by searching
for “destructor” or “finalizer”. Even by filtering this newsgroup topics
with these words I can’t find anything since the 2007-02-16.

Can you tell me where I can find this discussion please ?

On Feb 28, 2007, at 22:11, Guillaume Nargeot wrote:

them on the internet, but I didn’t find anything into them by
searching
for “destructor” or “finalizer”. Even by filtering this newsgroup
topics
with these words I can’t find anything since the 2007-02-16.

Can you tell me where I can find this discussion please ?

http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml

(google “ruby-talk archives”)

Guillaume Nargeot wrote:

for “destructor” or “finalizer”. Even by filtering this newsgroup topics
with these words I can’t find anything since the 2007-02-16.

Can you tell me where I can find this discussion please ?
With google,

ObjectSpace.define_finalize