2

I want to freeing up some memory after creating some cforest objects, which seems to occupy my memory even after deleting them from my environment like this:

cf_object <- NULL

I've already tried

rm(list = ls())

and

gc()

and

gc(reset = T)

I can only get rid of those occupied bytes with restarting R studio.

I am using Microsoft R Open 3.2.3 under 64 bit Windows 7. (Platform: x86_64-w64-mingw32/x64 (64-bit))

Any ideas?

sandoronodi
  • 315
  • 2
  • 12
  • What does `ls()` show you after running `rm(list = ls())` ? I'm assuming that when you exited R Studio you opted to not save the workspace? – Tim Biegeleisen Apr 25 '16 at 15:02
  • 1
    Why do you need to free up some memory? Does external software need that memory? – Roland Apr 25 '16 at 15:05
  • 1
    See the following [post](http://stackoverflow.com/questions/1467201/forcing-garbage-collection-to-run-in-r-with-the-gc-command?lq=1), which covers and links to a number of relevant issues. – lmo Apr 25 '16 at 15:16
  • @TimBiegeleisen rm(list = ls()) returns character(0) – sandoronodi Apr 25 '16 at 15:26
  • @Roland I need to create several cforests, for which I've got 16Gb-s of memory. I could grow bigger trees in an automated process (with a shorter running period) if I could manage to clean up the RAM within the process. Until that point I'll generate smaller forests with flushing the RAM manually :( – sandoronodi Apr 25 '16 at 15:36
  • R's garbage collection should take care of releasing the memory when needed. Manual input from the user is normally not required for this to work. – Roland Apr 25 '16 at 17:26

0 Answers0