List of Phobos functions that allocate memory?

Walter Bright newshound2 at digitalmars.com
Thu Feb 6 17:23:46 PST 2014


On 2/6/2014 11:54 AM, Sean Kelly wrote:
> Does this case even matter?  Exceptions are not a normal function of execution,
> and so should happen rarely to never.  And it's a time when I'd expect a delay
> anyway.

Right. If you're:

1. using throws as control flow logic

2. requiring a throw in a performance critical loop to be performance critical

3. doing so many throws that the garbage collector needs to run to clean them up

you're doing it wrong.

I'm tempted to say that the throw expression can call 'new' even if the function 
is marked as @nogc.


More information about the Digitalmars-d mailing list