List of Phobos functions that allocate memory?

Dicebot public at dicebot.lv
Thu Feb 6 13:33:34 PST 2014


On Thursday, 6 February 2014 at 18:52:21 UTC, fra wrote:
> Hey, wait a second. How do you throw without allocating?

Throw pre-allocated thread-local exception. And make a deep copy 
for it if it is going to be put into exception chain to avoid 
modifying one already in chain.

I have been told in that PR that some of language features assume 
exception instances are always unique and rely on it. It sounds 
like major language design flaw that will block usage of Phobos 
in memory-caring code even if other issues are taken care of. 
Probably language spec should be relaxed to fix this.


More information about the Digitalmars-d mailing list