Re: [boost] Proposal to add smart_ptr to the boost library

"Peter Dimov" <pdimov@mmltd.net> wrote in message news:<010a01c6265b$27cd4040$6507a8c0@pdimov2>...
David Maisonave wrote:
Since the current smart_ptr (policy_ptr) class at boost vault is on hold, I like to propose adding the following smart_ptr class to the boost library:
smart_ptr& operator=(const smart_ptr& Src) { if (m_type != m_type) { Src.lock(); m_ownership_policy.assign(m_type, m_clone_fct, Src.m_type, Src.m_clone_fct, Src.m_ownership_policy, m_ownership_policy); Src.unlock(); } return *this; }
You need a unit test. ;-)
Yep. You're absolutely correct. This is also why I wasn't able to duplicate the cycle refernece leak, similar to boost::shared_ptr. I seem to have thrown this bug in, when I was adding lock() logic. I've added a unit test for this specific logic. I still have plenty more to go. Thanks
participants (1)
-
David Maisonave