Difference B/w Finalize and Finally in .Net?

Hi Everyone,


I want the Difference between finalize method and Finally method in .NET and when exactly the garbage collector calls these methods. What does Dispose method does.

Replies

  • rashmi05
    rashmi05
    The Dispose pattern is used to release unmanaged resources in a timely fashion. This allows you to do this in a way that you have control over when they are released. where as Finalize method is also used for the purpose of releasing resources - but in this You have no control over when it will be called by the GC. Further,
    implementing a Finalize method can have an adverse affect on the performance of the GC because it takes two passes of the GC to collect objects that override Finalize.
  • babloo0311
    babloo0311
    thanks friends

You are reading an archived discussion.

Related Posts

Hello friends, Can anyone tell the description and some related questions of garbage collector and Common language runtime. Any links of frequently asked questions on these topics
where can i find Sql Syntax that are commonly used. The list of sql syntax for quick refernce.
Dct Does anybody know anything about the use of Lagrange interpolation in Discrete Cosine Transformation? It could be very helpful for me... thanks
Give some details, how to control the Var / power favtor control in a synchronised generator?
CEans, Former Autodesk CEO, the 60 year old Carol Bartz has been appointed the new CEO of Yahoo Inc. 😀 , Jerry Yang goes back to founders' role. Do you...