[D2] How to not full closure?

BCS ao at pathlink.com
Mon Jul 14 14:01:49 PDT 2008


Reply to bearophile,

>> Reply to mike,
>>
>>> Wouldn't it suffice to overload the new keyword?
>>> heap:
>>> delegate t = new { return 3; }
>>> stack:
>>> delegate t = { return 3; }
> Generally in D the default behavior must be the safer one, in this
> situation it means the heap version...

but "is heap allocation always safe?"





More information about the Digitalmars-d mailing list