Question: Let's say I have a class:

```
class Class1
{
    public List<Class2> Classes;
}

```

that I deserialize with XmlSerializer and Class2 creates some stuff that I should Dispose. Should I dispose everything myself or is that going to be done automatically?

Answer: 
Rule of thumb: if you're using a class that implements IDisposable, you should make sure to call the Dispose() method (you can use a using block for this). If the class doesn't implement IDisposable than .NET will take care of it for you.

For your *own* classes, you should implement IDisposable if your class has a member variable that either implements IDisposable or is unmanaged.
If Class2 has some stuff it should dispose of then this also means that Class1 has some stuff to dispose of, the Class2s. The safest thing to do would be to have Class1 also implement IDisposable and make its dispose method tidy up the Class2s.

```
class Class1 : IDisposable
{
    public List<Class2> Classes;

    public void Dispose()
    {
        foreach(Class2 c in Classes
        {
            c.Dispose();
        }
    }
}

```