GC for pure functions -- implementation ideas

bearophile bearophileHUGS at lycos.com
Tue Nov 8 05:53:42 PST 2011


Robert Jacques:

> I really like this general concept (It feels a lot like young/old
> generational collecting, but without the overhead), both for non-leaky
> pure functions and ctfe.

As first step to implement Don's GC idea I think it will be useful a __traits(gcallocates, someFunction) that returns true at compile-time if someFunction performs allocations from the GC heap or if it calls functions where __traits(gcallocates, otherFunction) returns true.

Bye,
bearophile


More information about the Digitalmars-d mailing list