1. unique_ptr is not a direct replacement. The major flaw that it fixes is the implicit transfer of ownership.
std::auto_ptr<int> a(new int(10)), b; b = a; //implicitly transfers ownership std::unique_ptr<int> a(new int(10)), b; b = std::move(a); //ownership must be transferred explicitly
2. On the other hand, unique_ptr will have completely new capabilities: they can be stored in containers.
3. unique_ptr can handle arrays correctly (it will call delete[], whileauto_ptr will attempt to call delete.