I launch the code below to emulate a realtime chart building
```
using (REngine engine = REngine.GetInstance())
{
var values = new double[100];
var rnd = new Random();
for (int i = 0; i < values.Length; i++)
{
values[i] = rnd.NextDouble();
var command = string.Format("y <-c({0})", string.Join(", ", values));
engine.Evaluate(command);
engine.Evaluate("plot(y)");
Thread.Sleep(100);
}
}
```
Why the window is freezing after program finishing and how to clear a memory when the chart done.
```
using (REngine engine = REngine.GetInstance())
{
var values = new double[100];
var rnd = new Random();
for (int i = 0; i < values.Length; i++)
{
values[i] = rnd.NextDouble();
var command = string.Format("y <-c({0})", string.Join(", ", values));
engine.Evaluate(command);
engine.Evaluate("plot(y)");
Thread.Sleep(100);
}
}
```
Why the window is freezing after program finishing and how to clear a memory when the chart done.