Apache OpenOffice (AOO) Bugzilla – Issue 123960
Replace uses of auto_ptr with standard compliant smart pointers
Last modified: 2014-01-03 09:23:59 UTC
The auto_ptr template was deprecated in C++11 because it has many well known problems that are solved by tts modern counterpart unique_ptr. Auto_ptr was also often abused in cases where it shouldn't have been used. The shared_ptr and weak_ptr might be the suitable replacements in these cases. Also if auto_ptr was misemployed to manage arrays then the replacement should get custom deleters to do the delete[] for destructing the array. It's too bad that e.g. boost's shared_array_ptr didn't make it into the C++11 standard.