Apache resigns from the Java Community Process executive committee
Apache resigns from the Java Community Process executive committee
Posted Dec 14, 2010 0:29 UTC (Tue) by HelloWorld (guest, #56129)In reply to: Apache resigns from the Java Community Process executive committee by cmccabe
Parent article: Apache resigns from the Java Community Process executive committee
http://www.boost.org/doc/libs/1_36_0/libs/smart_ptr/share...
I agree that this is a very nasty problem, and I'm not sure I would have spotted it in a code review.
What makes it worse is that there is no good way to avoid this problem. One could make all constructors private and create objects through static member functions which immediately wrap every new-ed pointer in a shared_ptr. But that requires boilerplate code, and a reusable solution can't be done well in C++98 (because of the perfect forwarding problem and because there are no variadic templates). It's really pretty bad, thanks for pointing that out.
