delete and __delete not equivalent

Nick Treleaven nick at geany.org
Fri Jan 15 13:15:12 UTC 2021


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.


More information about the Digitalmars-d mailing list