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
···
On 2/28/07, Guillaume Nargeot <guillaume.nargeotDONOTFUCKINGSPAM@fusionsystems.co.jp> 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 ?
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * You are in a maze of twisty little passages, all alike. // halo • statue
* austin@zieglers.ca
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 ?
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml
(google "ruby-talk archives")
···
On Feb 28, 2007, at 22:11, Guillaume Nargeot wrote:
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 ?
Guillaume Nargeot wrote:
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 ?
With google,
ObjectSpace.define_finalize