Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-13 14:20:26


"Ehsan Akhgari" <ehsan_at_[hidden]> writes:

> int main()
> {
> void * pv = custom_alloc( sizeof(X) ); // allocate
> X * p = new( pv ) X; // create
> delete( pv, p ); // destroy

I think this should be, simply,

  p->~X();

> custom_dealloc( p ); // deallocate
> }

-- 
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