Use auto_ptr is unique_ptr is not available.