what is the difference between garbage collection and Dispose Method

 Posted by Pavanandey on 4/20/2010 | Category: ASP.NET Interview questions | Views: 5027

if you want to delete resources(objects) those are not using you should not worry about that garbage collecter implicitly call finalize() method and remove all such object but if you want to delete object forcefully(The larger object you want to delete after completeing task) than you can explicitly call dispose() method.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Nandakumarpb on: 7/1/2010
Even you use a dispose method expicitily , you never know that when GC going to clean it.

Dispose mehod , normally you have to implement when the object memory cannot handled by GC. This can be a third party control or any other com object (old vb object) et.

Login to post response

More Interview Questions by Pavanandey