gc
Garbage Collection
Description
Collect unused memory and show memory usage.
Usage
gc(verbose = getOption("verbose"), reset = FALSE)
gcinfo(verbose)
Arguments
verbose |
a logical value or object that can be coerced to logical value.
If TRUE, gc will print a summary of memory usage.
|
reset |
a logical value, this argument is provided for compatibility with
open source R, and is ignored.
|
Details
The object system allocates memory when requested, but frees it
when the garbage collector is run to increase available memory
by releasing objects which are not in use.
Typically garbage collection is run when there is not enough memory
to perform the next requested allocation,
but it can also be run on demand.
gc will perform garbage collection on demand.
gcinfo is provided for compatibility with open source R
and the function has no effect and always returns FALSE.
Value
gc | returns NULL |
gcinfo | returns FALSE |
See Also
Examples
gc(verbose = TRUE, reset = FALSE)
gc(verbose = TRUE, reset = TRUE)
gc(verbose = FALSE, reset = TRUE)