Unitialized allocation

Steven Schveighoffer schveiguy at yahoo.com
Fri Jun 27 11:05:31 PDT 2008

"Jarrett Billingsley" wrote
> "Koroskin Denis" wrote
>> This surely should be available at a language level.
> It would be nice, but I'm not sure how it'd fit into the syntax.
> new(void) char[512] ?
> new void char[512] ?

New can take parameters, possibly one overload could be an enum that 
signifies how to handle the intialization of the data:

enum ArrayMemoryInit

auto x = new(NoInitializeMemory) char[512];


More information about the Digitalmars-d-learn mailing list