How does the compiler implement a virtual destructor?

Discussion in 'C++' started by ilovecpp@gmail.com, Dec 16, 2005.

  1. Guest

    it's a little bit comlicated to me.
     
    , Dec 16, 2005
    #1
    1. Advertising

  2. mlimber Guest

    mlimber, Dec 16, 2005
    #2
    1. Advertising

  3. wrote:
    > it's a little bit comlicated to me.
    >


    It implements it just like any other virtual function (and how that is
    done is unspecified by the language itself). In all implementations I
    have encountered, it was done through a table of virtual function, and
    a pointer to that table was stored in every object.

    If you'd like to know more, read "Inside the C++ Object Model" by Stan
    Lippman.

    V
     
    Victor Bazarov, Dec 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Calvin Lai
    Replies:
    7
    Views:
    564
    Calvin Lai
    Dec 18, 2003
  2. Chunhui Han
    Replies:
    2
    Views:
    515
  3. qazmlp
    Replies:
    1
    Views:
    578
    qazmlp
    Apr 10, 2005
  4. arun
    Replies:
    2
    Views:
    555
    benben
    Jun 13, 2006
  5. Juha Nieminen
    Replies:
    5
    Views:
    1,997
    Juha Nieminen
    Apr 16, 2008
Loading...

Share This Page