dynamically allocating on the stack
Uknown
sireeshkodali1 at gmail.com
Sun Apr 22 01:26:09 UTC 2018
On Sunday, 22 April 2018 at 01:07:44 UTC, Giles Bathgate wrote:
> 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?
Its a special case for classes. Makes them usable without the GC.
More information about the Digitalmars-d-learn
mailing list