hi
can anyone explain breifly about these 3 topics and their fuctionality...how they works internally
Garbage Collection and its functionality..where it called
Destructor and its functionality..where it called
and IDisposable interface and its functionality...wher it called
Confusing in using of Destructors ,IDisposable and Garbage collection
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Dec 25, 2009, 4:45 AM EST
IDisposableis used to deterministically clean up objects, i.e. now. It doesn't collect the object's memory (that still belongs to GC) - but is used for example to close files, database connections, etcIn Short .
Garbage collector is Use when we dont want to Free Up Memory Manually using manual Dispose Method .net takes responsibility of cleaning up resources..
IDisposible is used to Close File , Connection ,DataReaders etc .
Dispose is used when there is some custom object that is not Disposed by Garbage collector