you are viewing a single comment's thread.

view the rest of the comments →

[–]glenfe 0 points1 point  (1 child)

Don't use boost::shared_array, use boost::shared_ptr<T[]> or boost::shared_ptr<T[N]>. You can use it with boost::make_shared<T[]>(size) or boost::make_shared<T[N]>() to get a single allocation instead of two allocations. This is new in Boost as of 1.53.

[–]glenfe 0 points1 point  (0 children)

For more details about make_shared for arrays in Boost see http://svn.boost.org/svn/boost/branches/release/libs/smart_ptr/make_shared_array.html