try write auto_ptr by myself