should a delegate context ever be a non pointer?

Walter Bright newshound1 at digitalmars.com
Fri May 4 18:35:18 PDT 2007


BCS wrote:
> static delegate(MyObject) Build(uint i, uint k)
> {
>     Ctx c;
>     c.h = k;
>     c.l = i;
>     return &c.FillS;
> }

Looks like you're returning the address of a stack variable, which will 
cause erratic behavior.



More information about the Digitalmars-d mailing list