Scope storage class

Walter Bright newshound1 at digitalmars.com
Thu Nov 27 00:11:03 PST 2008


Jarrett Billingsley wrote:
> So my suspicion is correct, then?  That is:
> 
> scope int delegate() b;
> b = { ... };
> 
> Will allocate on the heap?

Yes. The scope for delegates takes effect as a parameter storage class, 
not a local variable storage class. The reason is because it is the 
called function that decides what it's going to do with the delegate.


More information about the Digitalmars-d-announce mailing list