dynamically allocating on the stack

Giles Bathgate giles.bathgate at gmail.com
Sun Apr 22 01:07:44 UTC 2018


On Saturday, 21 April 2018 at 19:06:52 UTC, Steven Schveighoffer 
wrote:
> alloca is an intrinsic, and part of the language technically -- 
> it has to be.

Why does:

scope c = new C();       // allocate c on stack
scope a = new char[len]; // allocate a via gc?



More information about the Digitalmars-d-learn mailing list