[R] How to define a destructor of an object?
Thomas Lumley
tlumley at u.washington.edu
Tue May 18 16:28:37 CEST 2004
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
More information about the R-help
mailing list