24 Sep
2007
24 Sep
'07
8:06 a.m.
Boris skrev:
struct foo { }; boost::ptr_map
bar; bar.insert(1, new foo()); bar.insert(1, new foo()); Does this code leak? Or does bar delete the second instance of foo?
The containers never leak. (If so, it is a bug). Yes, the second instance is deleted. -Thorsten