Tuesday, 12 January 2010

GNU R Garbage Collection

On GNU R if you delete your objects by

rm(list=ls())

This action won't free any memory associated with those objects. For this reason, R provides a utility for garbage collection, simply apply

gc()

This will free not used allocations. If you like to apply this whenever R allocates memory, apply this:

gctorture(on = TRUE)

Consult with R Internals manual for further details.

No comments:

Post a Comment