[Issue 1760] New: Closures - Variable unnecessarily allocated on heap

Lars Ivar Igesund larsivar at igesund.net
Tue Jan 1 09:31:41 PST 2008


d-bugmail at puremagic.com wrote:

> is means that 'int b' is allocated on the heap, even though the function
> 'int getb()' is never referenced.

As Matti says, sort of a limitation, but not really one it is possible to
solve because the compiler can never know if an object referencing it is
linked in later on.

-- 
Lars Ivar Igesund



More information about the Digitalmars-d-bugs mailing list