Quote Originally Posted by laserlight View Post
I would try not to use this, but instead use a smart pointer such as std::auto_ptr or std::tr1::shared_ptr, e.g.,
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.