Namespaces
Variants

std:: get_new_handler

From cppreference.net
< cpp ‎ | memory ‎ | new
Utilities library
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)
定义于头文件 <new>
std:: new_handler get_new_handler ( ) noexcept ;
(C++11 起)

返回当前安装的 new-handler,该值可能为空指针。

此函数是线程安全的。先前对 std::set_new_handler 的调用会与后续对 std::get_new_handler 的调用形成 同步关系 (参见 std::memory_order )。

参数

(无)

返回值

当前安装的 new-handler (可能为空指针值)。

参阅

分配函数
(函数)
注册新的处理函数
(函数)
新处理函数的函数指针类型
(类型定义)