Also auto_ptr doen't support proper deallocation on arrays. For that you need boost::scoped_ptr or something similar. Also be careful about multiple references with auto_ptrs, but they are preferred for RAII.
Also auto_ptr doen't support proper deallocation on arrays. For that you need boost::scoped_ptr or something similar. Also be careful about multiple references with auto_ptrs, but they are preferred for RAII.