Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How does the compiler implement a virtual destructor?

Reply
Thread Tools

How does the compiler implement a virtual destructor?

 
 
ilovecpp@gmail.com
Guest
Posts: n/a
 
      12-16-2005
it's a little bit comlicated to me.

 
Reply With Quote
 
 
 
 
mlimber
Guest
Posts: n/a
 
      12-16-2005
(E-Mail Removed) wrote:
> it's a little bit comlicated to me.


It's similar to an ordinary virtual function. See these FAQs:

http://www.parashift.com/c++-faq-lit....html#faq-20.3
http://www.parashift.com/c++-faq-lit....html#faq-20.4

Cheers! --M

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      12-16-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How Does compiler implement virtual destructor ??? Juha Nieminen C++ 5 04-16-2008 04:33 PM
Does C implement the first C compiler itself? lovecreatesbea...@gmail.com C Programming 30 02-23-2007 08:09 PM
how the C++ compiler implement the exception handling? dick C++ 4 05-22-2006 10:45 PM
How does a compiler implement exception handling ? Robert Finch C++ 1 03-27-2005 06:04 AM



Advertisments