Results 1 to 4 of 4

Thread: dispose,finalize

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    17

    dispose,finalize

    Hi friends,
    I am little bit confused about dispose,finalize concepts...can anybody clarify these two concepts....


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: dispose,finalize

    Quote Originally Posted by vikasvaidya View Post
    Few quick points on Finalize() and Dispose() in C#:

    1. Finalize() is the C# equivalent of destructor ~Object() syntax in C#. In VB.Net you implement the Finalize() by overriding it. But, in C# the compiler translates the destructor to a Finalize() method.

    2. Finalize() can NOT be overridden or called in C#.

    3. Since, Finalize() is called by the Garbage Collector, it is non-deterministic.

    4. Dispose() has to be implemented in classes implementing IDispose interface.

    5. Its the right place for freeing-up unmanaged resources like file, handles, and connections etc.

    6. Dispose() method is called explicitely in the code itself.

    7. Dispose() method is automatically called (for objects which implement IDispose), when used in a "using" statement.

    Still hungry..... http:// forums . asp . net/p/466400/593963 . aspx#593963

    ----V V----
    Regards,
    Vikas Vaidya
    This is reply of vikasvaidya to the previous question. Both the threads are moved to proper forum.


  3. #3
    Junior Member
    Join Date
    Feb 2008
    Answers
    17

    Re: dispose,finalize

    Quote Originally Posted by debasisdas View Post
    This is reply of vikasvaidya to the previous question. Both the threads are moved to proper forum.
    Thanks allot vidya for clarifying the dipose and finalize.........


  4. #4
    Junior Member
    Join Date
    Feb 2008
    Answers
    17

    Re: dispose,finalize

    plz let me know diff between public assembly and satilite assembly....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact