$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Subject: Re: [shared_ptr] Where is the bug?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-10-03 06:56:32
Kasra Nassiri(Math & ComSci) wrote:
> Hi,
>
> Well the bug is in the fact the when you allocated:
> B* b = new X();
>
> You have allocated an int extra, thus when you call:
> delete b;
>
> You are only destructing what was allocated by B
No.
You are invoking undefined behaviour.