Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-02-10 08:50:01


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> writes:

> Rather than yet another underdocumented shared pointer with
> subtly different name it should be:
>
> boost::shared_ptr<void, shmem::deleter> p = segment.allocate(1024);

One of the coolest things about shared_ptr is that the deleter is not
part of the type. There is no deleter template parameter.. That would
be:

    boost::shared_ptr<void> p = segment.allocate(1024, shmem::deleter());
     

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk