Possible Duplicate:
Proper use of the IDisposable interface
When is Dispose necessary?
If I write a class, which uses graphics, or threads for example, must I implement the IDisposable interface to write a Dispose() method or else memory leak occurs? Does Dipose() run when the GC reaches it? If I implement a Dispose() method, shall I call Dispose() on all the disposable fields in the class when "disposing" parameter is true, or is it automatic? What is "unmanaged resource"?
So I'm pretty unsure about it, I'd appreciate anything that helps me understand these things :) Thank You