Sanjeev Singh
What is Finalizer in .NET define Dispose and Finalize ?
By Sanjeev Singh in ASP.NET on Sep 26 2008
  • Sanjeev Singh
    Sep, 2008 26

    We can say that Finalizer are the methods that's helps in cleanp the code that is executed before object is garbage collected .The process is called finalization . There are two methods of finalizer Dispose and Finalize .There is little diffrenet between two of this method . When we call Dispose method is realse all the resources hold by an object as well as all the resorces hold by the parent object.When we call Dispose method it clean managed as well as unmanaged resources. Finalize methd also cleans resources but finalize call dispose clears only the unmanged resources because in finalization the garbase collecter clears all the object hold by managed code so finalization fails to prevent thos one of methd is used that is: GC.SuppressFinalize.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS