Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Objects/Constructors/MemoryFull

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The C language's malloc() returned NULL if memory was full when that allocation was attempted. C++'s CRType* poObj = new CRType; instead throws a std::bad_alloc exception. Alternatively, you could use std::set_new_handler() to specify a callback that will be repeatedly called until enough memory is available. Additional information about memory being full