Reverted back to auto_ptr