@safe leak fix?

bearophile bearophileHUGS at lycos.com
Wed Nov 11 18:05:04 PST 2009


Walter Bright:

>I thought of that, but I think it's too restrictive.<

I agree. A possible solution to this problem (Ellery Newcomer may have said the same thing): in safe functions require locally some kind of annotation that turns that into a safe heap allocation (and at the same time it denotes such heap allocation in a visible way). In unsafe functions such annotation is optional, while in safe code you must put it if you want to use the feature.


>"system" sounds good.<

"unsafe" is still good that purpose because it's like the __ for gshared: it's designed on purpose to look less nice.

Bye,
bearophile



More information about the Digitalmars-d mailing list