On 22.11.2012 00:39, Leigh Johnston wrote:
> "ISO C++11 mandates that std::unique_ptr<T>::reset() deletes the owned
> object *after* resetting the pointer to the owned object rather than
> before as VC10 and VC11 are currently doing.
> This can cause a problem if the destructor of the owned object calls
> back to code which attempts to call reset() a second time on the same
> unique_ptr object resulting in double delete; workaround is to take a
> local copy of the unique_ptr object rather than use reset()."
Not sure I get the workaround. Can you post a code sample?