|
Boost : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-05-03 16:22:56
AMDG
Stefan Seefeld wrote:
> #include <iostream>
>
> struct Base
> {
> ~Base() { std::cout << "~Base" << std::endl;}
> };
>
> struct Derived : Base
> {
> ~Derived() { std::cout << "~Derived" << std::endl;}
> };
>
> void destruct(Base *b) { delete b;}
>
> int main(int, char **)
> {
> Derived *derived = new Derived;
> destruct(derived);
> }
>
>
> Run the above code as is, and with the base destructor made virtual, to
> see the difference.
>
That's true, but AFAICT, completely irrelevant in this case.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk