delete and __delete not equivalent

Imperatorn johan_forsberg_86 at hotmail.com
Fri Jan 15 13:44:19 UTC 2021


On Friday, 15 January 2021 at 13:15:12 UTC, Nick Treleaven wrote:
> On Friday, 15 January 2021 at 01:28:55 UTC, Imperatorn wrote:
>> https://issues.dlang.org/show_bug.cgi?id=21550
>
> From that issue, it's surprising that delete frees array memory 
> even when the ptr field isn't the start of the allocation. I 
> would've guessed calling a GC function to look up the start of 
> the allocation would be needed first. That function might be 
> useful in other contexts too.

Yeah, I wonder how many use this new approach. They would suffer 
in silence 🤐

Should be an easy fix tho. Could maybe get it into the next 
upcoming release even.


More information about the Digitalmars-d mailing list