CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2013
    Posts
    19

    Question destruktor finalize handling within derived class

    http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx

    Hi there,
    I'm carring about base.finalize methode, main question is the handling within a derived class
    This first code example within the link above are almost fine(starts with "Public Class Base"), but base.finalize will never called,
    even GC will never called, for reasons of " GC.SuppressFinalize".

    The next examples on that side starts with "TestConstructorsAndDestructors", shows handling with "using".
    In that case "base.finalize" is called from "Thisclass". And furthermore a finalize methode is implemented within "Thisclass",
    as it es descript on many websides which saying, a finalize methode has to be implemented.

    If I use any object like SQLConnection than of course I have to trust, I do not figure out how it works in every detail.
    But in this case... "a finalize methode has to be implemented" is called for every way, not only for "using".

    So where is the explecation about: why the first example doesnt have a finalize methode within derived class, and why the finalize methode is never called.?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: destruktor finalize handling within derived class

    The sample you've posted is VB.Net code. Are you trying to code in C# or in VB.Net?

  3. #3
    Join Date
    Sep 2013
    Posts
    19

    Re: destruktor finalize handling within derived class

    Your answers, are common answers of those, who are unable to analyze any simple thing.
    And you put shame on those who are named MVP as well

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured