+ Reply to Thread
Results 1 to 4 of 4

Difference B/w Finalize and Finally in .Net?

This is a discussion on Difference B/w Finalize and Finally in .Net? within the Computer Science & IT Engineering forums, part of the CE : Technical Discussions category; Hi Everyone, I want the Difference between finalize method and Finally method in .NET and when exactly the garbage collector ...

  1. #1
    CE - Regular Member babloo0311's Avatar
    Join Date
    14th August 2008
    I'm a crazy: Information science engineer

    Location
    India
    Posts
    86

    Default 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.

  2. #2
    CE - Enthusiast arunhero99's Avatar
    Join Date
    7th January 2009
    I'm a crazy: Electronics engineer

    Location
    Bangalore
    Posts
    121

    Default Re: Difference B/w Finalize and Finally in .Net?


  3. #3
    CE - Newbie rashmi05's Avatar
    Join Date
    1st September 2008
    I'm a crazy: COMPUTERS engineer

    Posts
    6

    Default Re: Difference B/w Finalize and Finally in .Net?

    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.

  4. #4
    CE - Regular Member babloo0311's Avatar
    Join Date
    14th August 2008
    I'm a crazy: Information science engineer

    Location
    India
    Posts
    86

    Default Re: Difference B/w Finalize and Finally in .Net?

    thanks friends

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts