[R] finalize objects

mkondrin mkondrin at hppi.troitsk.ru
Wed Jul 13 13:30:53 CEST 2005

How to set function for the whole R-class to be executed when the object 
is no more referenced from R and garbage collection takes place? I need 
the function to be applied for the whole class (let it be "someRClass") 
like this someRClass.on.finalize<-function(...){...}. I have found 
reg.finalizer function in the manuals, but it apply for the class 
instance, the thing that I do not like.
What is the solution?

More information about the R-help mailing list