onGarbageCollect: Registers a function to be called when the R garbage collector
is (detected to be) running
Description
Registers a function to be called when the R garbage collector
is (detected to be) running.Usage
## S3 method for class 'default}(fcn, action=c("prepend", "append", "replace"), ...)':
onGarbageCollectundefined
- fcn
{A function
to be called without argument.}
- action
{A character
string specifying how the hook function is
added to list of hooks.}
- ...
{Not used.}
Returns (invisibly) the hooks successfully called.
[object Object]
onGarbageCollect(function(...) {
cat("The R garbage collector is running!\n");
})
programming