Tango vs Phobos
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Aug 25 11:26:52 PDT 2008
Walter Bright wrote:
> Bruno Medeiros wrote:
>> But in reading Frank Benoit's post in the full closure thread below,
>> I've already seen one meanwhile. I didn't know the compiler
>> heap-allocated a local in every situation where a local is used as an
>> outer variable. That indeed puts a serious burden on the use of scoped
>> closures :(
>
> It doesn't do it in every situation. It does it in a situation where a
> pointer is taken to a function that accesses it.
Hum, that's right, I hadn't noticed. My previous comment was due to the
fact that I was always experimenting with delegate literals. And
unfortunately a delegate literal itself counts as "taking a pointer to a
function", so any outer variable used in a delegate literal will be
allocated. :/
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list