In the next code segment, I wonder why testvectorsit isnβt going to after the function call. I see that memory usage is increased to 270 MB, and then stays there forever.
This function is called directly from Main.
private static void increaseMemoryUsage()
{
List<List<float>> testvectors = new List<List<float>>();
int vectorNum = 250 * 250;
Random rand = new Random();
for (int i = 0; i < vectorNum; i++)
{
List<Single> vec = new List<Single>();
for (int j = 0; j < 1000; j++)
{
vec.Add((Single)rand.NextDouble());
}
testvectors.Add(vec);
}
}
source
share