1: Should one implement/ inherit IDisposable to custom class, so it can be disposed when needed?
2: Shoud one even wory about No.:1?
3: Will GC take care of cleaning all the resources even when my object is not being destroyed?
For example:
If I have a class (pseudo)
class MyClass { //do some stuff }
and use it (pseudo)
MyClass Foo = New MyClass(); Foo.DoSomeStuff Foo.Dispose(); <- ain't there (not implemented...) Foo.Close(); <- ain't there (not implemented also...) Foo=null; <- is it worth?
So, what would be the best way to deal with it? Or should I just let the GC take care of everything?