Re: [R] How to define a destructor of an object?

About this list Date view Thread view Subject view Author view Attachment view

From: Thomas Lumley (tlumley@u.washington.edu)
Date: Wed 19 May 2004 - 00:28:37 EST


Message-id: <Pine.A41.4.58.0405180726210.163418@homer36.u.washington.edu>

On Tue, 18 May 2004, Shin, Daehyok wrote:

> Is there any way to define a destructor method of an object,
> which is called automatically when garbage collector reclaims it?
>

yes, there is support for finalizers at both the C and R levels. For the R
level see ?reg.finalizer. I thought there was documentation for the C
stuff on developer.r-project.org, but I can't see it now.

        -thomas

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST