Q:

Memory leaks and dispose

May I do not understand the conecept or I do something wrong.
I have some questions about the memory management in .NET.
Imagine the situation:
Form1 is the big man Form, as MDI-parent and a little FormChild, is bound as child:
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            FormChild formChild = new FormChild();

            formChild.MdiParent = this;
            formChild.Show();

        }
    }

Now the child is allocating a little bit memory as simulation:
public partial class FormChild : Form
{
    private readonly List<byte[]> _list = new List<byte[]>();

    public FormChild()
    {
        InitializeComponent();

    }

    private void FormChild_Load(object sender, EventArgs e)
    {
        int i = 0;
        while (i < 100)
        {
            _list.Add(new byte[1024 * 1024 * 10]);
            i += 1;
        }

    }

}

Now, I'm inspecting with a memory profiler whats going on in the memory heap.
I see, if i click on the button, the memory is allocated. Then I close the FormChild and it calls Dispose(). But the memory is still allocated. If I click again a System.OutOfMemoryException occures.
Why is the GC waiting to free the managed memory?
Or is this my mistake of design?

A:

The GC only frees memory in response to memory pressure, the main purpose of Dispose is to clean up non-memory related resources.
In other words nulling out managed objects isn't necessarily going to make them get collected any faster, but makes diagnosing memory issues much easier to diagnose.

A:

It looks like some sort of timing problem, where the first instance of formChild  is still reachable (ie not garbage) wen the second one is created. You can't accommodate that _list twice. 
Note that I close the FormChild and it calls Dispose() is a statement about resources and Window handles, not about freeing the memory. 
It is not clear if you wrote your own Dispose() but in this (rather special) case you should. 

Cut the void Dispose(bool disposing) method from the FormChild.Designer.cs file and move it to FormChild.cs . 
use it to release the huge memory block:
protected override void Dispose(bool disposing)
{
    _list = null;  // add this

    if (disposing && (components != null))
    {
        components.Dispose();
    }
    base.Dispose(disposing);
}

Note that this is not a 'usual' form of memory management but it's needed because your _list is unusual too. 

