@safe leak fix?

Walter Bright newshound1 at digitalmars.com
Wed Nov 11 15:17:30 PST 2009


grauzone wrote:
> Walter Bright wrote:
>> grauzone wrote:
>>> In this case, the semantic difference between safe and unsafe 
>>> functions will cause trouble, and you'd eventually end up imposing 
>>> the "safe" semantics upon unsafe functions.
>>
>> May be.
> 
> Returning a slice to a local static array would be fine in safe mode, 
> but lead to silent corruption in "unsafe" mode. I think everyone would 
> assume that, if something works in safe mode, it should also work in 
> unsafe mode.

It's a good point.


> So, it's really a "must", or is there some other way around it?

I don't know.



More information about the Digitalmars-d mailing list