Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] Malloc exceptions when using test framework on 64bit OS X 10.6.1
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-10-01 14:39:48


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net