$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Interprocess] shared_ptr in shared memory and inheritance
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-02-09 16:01:32
Emil Dotchevski wrote:
> You're probably doing something wrong, shared_ptr doesn't require
> virtual destructor to call the correct destructor. Here is a working
> example: http://codepad.org/sktELTDk
Yes, it needs a virtual destructor if it's a shared_ptr to the base
class, otherwise you can't achieve type erasure. This virtual call does
not happen with boost::interprocess::shared_ptr because virtuality is
forbidden in shared memory.
Regards,
Ion