Placement New, Was: (Re: auto, var, raii,scope, banana)

Sean Kelly sean at f4.ca
Thu Jul 27 11:31:56 PDT 2006


Chris Miller wrote:
> On Wed, 26 Jul 2006 01:23:53 -0400, Regan Heath <regan at netwin.co.nz> wrote:
>>
>> http://www.digitalmars.com/d/memory.html#newdelete
> 
> I hadn't thought of 'placement' new but this page is what I was 
> referring to. Scroll down to "Allocating Class Instances On The Stack" 
> to see what I meant. Different uses of 'new' (RAII/regular) could call 
> different new()s, which doesn't imply heap.

This is placement new--the parameter to new specifies the location where 
the object will be constructed.


Sean



More information about the Digitalmars-d mailing list