> On Tue, May 3, 2011 at 2:18 PM, Peter Dimov <
pdimov@pdimov.com> wrote:
>
> Peter,
> can you please give an example how that can happen, given the shared_counter
> is atomic. I thought the counter is first incremented than the rest of the
> machinery deals with pointer copying etc. and in case of underlying object
> destruction, the counter is first decremented and than the object is
> destroyed. How is that possible, that shared_counter reaches 0, destructor
> is called and afterwards the underlying pointer will be assigned to the new
> shared instance?
> With Kind Regards,
> Ovanes
>