onGarbageCollect

0th

Percentile

Registers a function to be called when the R garbage collector is (detected to be) running

Registers a function to be called when the R garbage collector is (detected to be) running.

Keywords
programming
Usage
# S3 method for default
onGarbageCollect(fcn, action=c("prepend", "append", "replace"), ...)
Arguments
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.

Value

Returns (invisibly) the hooks successfully called.

Aliases
  • onGarbageCollect.default
  • onGarbageCollect
Examples
# NOT RUN {
  onGarbageCollect(function(...) {
    message("The R garbage collector is running!")
  })
# }
Documentation reproduced from package R.utils, version 2.8.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.