[set.new.handler]

# 17 Language support library [[support]](./#support)

## 17.6 Dynamic memory management [[support.dynamic]](support.dynamic#set.new.handler)

### 17.6.4 Storage allocation errors [[alloc.errors]](alloc.errors#set.new.handler)

#### 17.6.4.4 set_new_handler [set.new.handler]

[ð](#lib:set_new_handler)

`new_handler set_new_handler(new_handler new_p) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L3122)

*Effects*: Establishes the function designated by new_p as the currentnew_handler[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L3127)

*Returns*: The previous new_handler[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L3131)

*Remarks*: The initial new_handler is a null pointer[.](#3.sentence-1)
