Destructor

Hi,

Is it possible to write my own destructor in ruby? I used ADODB.Connection
in a program, wondering if I need to use a destructor or use some way to
catch the SystemExit exception to do conn.close? And btw, is the SystemExit
exception raised by the exit method, or it will always occur even when
program ended naturally?

Thanks,
Shannon

···

MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

“Shannon Fang” xrfang@hotmail.com writes:

Is it possible to write my own destructor in ruby? I used

See http://www.rubygarden.org/ruby?GCAndMemoryManagement , the 2nd to
last section.

YS.