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/PlacementNew

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

C++'s new operator allocates memory, and then executes some constructor within that memory. Low-level software might already have some memory pre-allocated for a new object, only wanting to run its constructor. To do so, call a "placement new" as CRType* poVar = new (preallocation) CRType;. Additional information about placement new