New feature in git-head: Uniform construction for built-in types

bearophile bearophileHUGS at lycos.com
Fri Mar 7 04:34:52 PST 2014


Remo:

> Every time I see something like this in C++, I see bad C++ and 
> I see memory leaks :)
>
> But how is this handle in D2, is this real memory allocation in 
> the second example?  Probably no?

"new int(1)" allocates on the GC-managed heap, and no memory 
leaks should happen.

Bye,
bearophile


More information about the Digitalmars-d mailing list