Q:

Why is this object not garbage collected

In the following code segment, I am wondering why testvectors is not collected after the function call. I see memory usage go up to 270Mb and then stay there forever.
This function is directly called 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);
    }
}

A:

Don't confuse garbage collection with reference counting. The memory is freed when the runtime decides, not always when it's no longer referenced. To quote:

Garbage collection occurs when one of the following conditions is
  true:
The system has low physical memory.
The memory that is used by allocated objects on the managed heap
  surpasses an acceptable threshold. This means that a threshold of
  acceptable memory usage has been exceeded on the managed heap. This
  threshold is continuously adjusted as the process runs.
The GC.Collect method is called. In almost all cases, you do not have
  to call this method, because the garbage collector runs continuously.
  This method is primarily used for unique situations and testing.

Read this if you're interested: 
http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx

A:

The GC can run when it wants. And that can be much later. There is no obligation to free some memory directly after the last reference goes away. Your array will get collected on the next Gen2 collection.
Unless you keep allocating memory, it will likely never run after the function returns.
You can manually trigger a GC with GC.Collect(), but that's generally discouraged.

A:

I observe the opposite when I run this:
 class Program
    {
        static void Main(string[] args)
        {
            increaseMemoryUsage();

            Console.WriteLine("Hit enter to force GC");
            Console.ReadLine();

            GC.Collect();

            Console.ReadLine();
        }

        private static void increaseMemoryUsage()
        {
            var testvectors = new List<List<float>>();
            const int vectorNum = 250 * 250;
            var rand = new Random();

            for (var i = 0; i < vectorNum; i++)
            {
                var vec = new List<Single>();

                for (var j = 0; j < 1000; j++)
                    vec.Add((Single)rand.NextDouble());

                testvectors.Add(vec);
            }
        }    
    }

