By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 913 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

How does the compiler implement a virtual destructor?

P: n/a
it's a little bit comlicated to me.

Dec 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ilove...@gmail.com 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

Dec 16 '05 #2

P: n/a
il******@gmail.com 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
Dec 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.