How does the compiler implement a virtual destructor?

V

Victor Bazarov

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top