delegates & GC allocations
Ola Fosheim Gr via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 20 14:19:17 PDT 2014
On Wednesday, 20 August 2014 at 20:48:38 UTC, Chris
Nicholson-Sauls wrote:
> On Wednesday, 20 August 2014 at 15:17:52 UTC, Ola Fosheim Gr
> wrote:
>>> non-static nested functions are effectively delegates as it
>>> needs a context pointer to parent stack frame.
>>
>> Only if it is recursive.
>
> Or if it refers to any state of the parent function.
As long as the compiler knows where it will be called from it
should be able use a stack pointer offset (unless alloca gets in
the way) without the frame pointer of the parent.
More information about the Digitalmars-d-learn
mailing list