Question: I have a list called `Population`, is a great list of very many positions and at some point I stop using it. How I can free the resources?
Then this is part of the code:

```
 private List <BasePopulation> Population=new List <BasePopulation>();
 Population.SomeMethod();
 Population.Clear();

```

I used the Clear method, but not works. Any idea?

Answer: 
You must clear the list, and after that invoke the GC to remove it from memory. As follows with extensive method:

```
public static void ClearMemory<T>(this List<T> lista)
{
    int identificador = GC.GetGeneration(lista);
    lista.Clear();
    GC.Collect(identificador, GCCollectionMode.Forced);
}

```
Edit, rewording my answer about Disposing.
Ok, I must have been imagining things when I typed Clean. I'm assuming that if clearing all of the items from your list is not free resources, then the resources you are trying to free up are unmanaged. Based upon that assumption you'll need BasePopulation to implement IDisposable so when that object gets picked up by the garbage collector, those resources can then be released.

<http://msdn.microsoft.com/en-us/library/system.idisposable.aspx>