Namespaces
Variants

std::auto_ptr<T>:: reset

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
void reset ( T * p = 0 ) throw ( ) ;
(C++11で非推奨)
(C++17で削除)

保持されているポインタを p で置き換えます。現在保持されているポインタがnullポインタでない場合、 delete get ( ) が呼び出されます。

パラメータ

p - 管理対象オブジェクトへのポインタ

戻り値

(なし)

関連項目

管理対象オブジェクトの所有権を解放する
(public member function)