26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure :- 6.8 Garbage collection in actions<br />

(I)How can we suppress a finalize method?<br />

GC.SuppressFinalize ()<br />

(B)What’s the use of DISPOSE method?<br />

Dispose method belongs to IDisposable interface. We had seen in the previous section<br />

how bad it can be to override the finalize method for writing the cleaning of unmanaged<br />

resources. So if any object wants to release its unmanaged code best is to implement<br />

117

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!