1 Oct
2009
1 Oct
'09
6:39 p.m.
AMDG Gennadiy Rozental wrote:
Steven Watanabe wrote:
With a virtual destructor the compiler generates read the pointer use the v-table to call the destructor/delete. This is a single function call so the pointer is only looked up once.
Is it necessary has to be single function call?
There is no reason it has to be done this way. I was just describing what I've seen compilers generate.
What is so special about this case? Don't we just added search through virtual functions table?
The only thing special about the virtual destructor is that two function calls (destructor and operator delete) are combined in a single virtual function call. In Christ, Steven Watanabe