Use reset instead of assignment when updating auto_ptr/unique_ptr