
29 Jun
2009
29 Jun
'09
12:13 a.m.
2009/6/28 Christian Schladetsch <christian.schladetsch@gmail.com>:
On Mon, Jun 29, 2009 at 12:58 PM, Robert Ramey <ramey@rrsd.com> wrote:
How is this different from a container of <boost/variant.hpp>
boost::variant doesnt support custom allocators. it uses naked new and delete.
A quick test with geordi suggests that it uses placement new, not naked new: <> geordi, { unique_ptr<tracked::B> p(new tracked::B); } <geordi> new(B) B0* B0~ delete(B0) <> geordi, { boost::variant<tracked::B> v; v = tracked::B(); } <geordi> B0* B1* B0=B1 B1~ B0~