[R] R.oo Destructors

Feng, Ken [CIB-EQTY] ken.feng at citigroup.com
Thu Jan 18 00:51:36 CET 2007


Has anyone figured out how to create a destructor in R.oo?

How I'd like to use it:  I have an object which opens a connection thru RODBC
(held as a private member) It would be nice if the connection closes automatically
(inside the destructor) when an object gets gc()'ed.

Thanks in advance.

Regards,
Ken
BTW, a >BIG< thanks to Henrik Bengtsson for creating the R.oo package!
Lucky for me as I am not smart enough to use S4...



More information about the R-help mailing list