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

Reply via email to