Content deleted Content added
Hans Adler (talk | contribs) →References: split section, Franek ref |
Hans Adler (talk | contribs) grammar; also result is not just cast but also initialized (depending on the style of invocation?? I am not a C++ programmer) |
||
Line 2:
<!-- Do not use the "dated prod" template directly; the above line is generated by "subst:prod|reason" -->
{{lowercase|title=Placement new (C++)}}
In the [[C++]] [[programming language]], placement new is a form of the [[New_(C++)|new]] operator that allows object construction into an existing [[memory]] buffer. Unlike other forms of <code>new</code>, the new object does not have to be in heap [[memory]]. The [[Pointer (computing)|pointer]] returned by placement new is the [[Pointer (computing)|pointer]] provided as an argument, [[Type_conversion|
Placement new is necessary for hardware that expects a certain object at a specific hardware address. It is also required for the construction of objects that need to reside in a certain memory area, such as an area that is shared between several processors of a multiprocessor computer.<ref name="DE">{{Citation | last1=Stroustrup | first1=Bjarne | author1-link=Bjarne Stroustrup | title=Design and Evolution of C++ | publisher=[[Addison-Wesley]] | isbn=978-0-201-54330-8 | year=1994}}, section Memory Management.</ref>
|