Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2004-01-21 13:45:49

On 01/21/2004 12:08 PM, Jonathan Turkanis wrote:
> "Larry Evans" <cppljevans_at_[hidden]> wrote in message
> Hi Larry,
> pointers in Bronek's implementation. What exactly is the storage
> overhead in your implementation?
   sizeof(auto_smart_ptr<vector_ptr<T> >) == sizeof(T*)
   sizeof(auto_smart_ptr<T>) == sizeof(T*) + sizeof(virtual_dtor*)

The referent in the case of auto_smart_ptr<Referent> is actually

   < typename Overhead
   , typename Referent
class overhead_referent_vals
: public Overhead
, public Referent

I.e. to each actual referent, there's added the Overhead, which in the
case of auto_smart_ptr is virtual_dtor. This is why I said the
overhead per referent or something like that is the virtual table pointer.

Boost list run by bdawes at, gregod at, cpdaniel at, john at