memory management

Mar 27, 2012 at 1:28 AM

This uses a lot of memory.

 I don't see how to free up this memory.

 It does not seem to be garbage collected--does anybody know about this?

 

 

List<NumericVector> list = new List<NumericVector

>();

 

for (int

i = 0; i < 15; ++i)

{

 

NumericVector random = rengine.Evaluate("rnorm(10000000, 0, 1)"

).AsNumeric();

list.Add(random);

rengine.SetSymbol(

"rnd"

+ i, random);

 

string evalstr = string.Format("hist(rnd{0})"

, i);

rengine.Evaluate(evalstr)

}

Apr 5, 2012 at 7:35 PM

Sorry for the R newbie goof. The R cmds for memory management.

rm(arg1, arg2, ...) will remove

gc() will garbage collect