Placement syntax: Difference between revisions

Content deleted Content added
Added important keyword.
grammar
Line 1:
In the [[C++]] [[programming language]], '''placement syntax''' allows programmers to explicitly specify the [[memory management]] of individual objects &mdash; i.e. their "placement" in [[memory (computing)|memory]]. The "placement" versions of the <code>new</code> and <code>delete</code> operators and functions are known as '''placement <code>new</code>''' and '''placement <code>delete</code>'''.<ref name=McCluskey1>{{cite web|url=http://glenmccl.com./nd_cmp.htm|title=Placement New/Delete|publisher=Glen McCluskey &amp; Associates LLC|work=C++ Language and Library|date=[[2000-06-26]]|accessdate=[[2008-11-26]]}}</ref>
 
A new ''expression'', placement or otherwise, calls ana new ''function'', also known as an allocator function, whose name is <code>operator new</code>. Similarly, a delete ''expression'' calls a delete ''function'', also known as a deallocator function, whose name is <code>operator new</code>.<ref name=Lischner1 /><ref name=Lippman1 />
 
== Expressions ==
The Standard C++ syntax for a non-placement <code>new</code> expression is<ref name=Lischner1>{{cite book|title=C++ in a Nutshell|author=Ray Lischner|pages=72&ndash;73,128&ndash;129,310,623&ndash;625|publisher=O'Reilly|date=2003|isbn=059600298X|isbn13=9780596002985}}</ref>