C# Destructors and IDisposable
This week I found myself somewhat confused on when to use destructor. Originally I assumed that anytime you implement IDisposable you should have a destructor that calls Dispose(). This is not the case though. The only time you really need a destructor is when a class directly contains unmanaged resources, like file handles. A good example of when not to use a destructor is a wrapper class. For instance, if you have a database connection class wrapped with some sort of adapter class, the adapter class doesn’t need a destructor. »