onGarbageCollect.Rd
Registers a function to be called when the R garbage collector is (detected to be) running.
# S3 method for default
onGarbageCollect(fcn, action=c("prepend", "append", "replace"), ...)
Returns (invisibly) the hooks successfully called.
if (FALSE) {
onGarbageCollect(function(...) {
message("The R garbage collector is running!")
})
}