Difference between Dispose and Finalize method

Answer Posted / kirti

Finalize method is used to free the memory used by some unmanaged resources like window handles (HWND). It's similar to the destructor syntax in C#. The GC calls this method when it founds no more references to the object. But, In some cases we may need release the memory used by the resources explicitely.To release the memory explicitly we need to implement the Dispose method of IDisposable interface.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any particular component of .net framework 3.0 be removed?

516


What is objectcontext? : Entity framework

590


What is viewbag title?

525


What is the use of razor view engine?

525


What is MVVM design pattern?

598






Do I need microsoft .net framework?

550


How to bind table colum with gridview column?

609


What are the possible razor view extensions?

565


Explain what is the difference between view and partial view?

573


What is Dependency Injection in ASP.Net MVC

582


What is meant by domain model?

538


What is the difference between viewbag and viewdata in asp.net mvc?

615


what do you mean by navigation property?

589


What is partialview in asp.net mvc?

593


What is Area in ASP.Net MVC?

611