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
Loading
Kirtan PatelPosted Dec 25, 2009, 9:45 AM
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