Memory leak in foreach

Andrea Fontana nospam at example.org
Wed Feb 20 09:31:30 UTC 2019


This subtle bug[1] and its memory leak are still here because my 
pull request[2] had no success.

It worths noting that since each() in std.algorithm uses a 
foreach+ref to iterate  structs[3], this memory leak probably is 
silently affecting not only me :)

I hope someone could fix this.

[1] https://issues.dlang.org/show_bug.cgi?id=11934
[2] https://github.com/dlang/dmd/pull/8437
[3] 
https://github.com/dlang/phobos/blob/master/std/algorithm/iteration.d#L983


More information about the Digitalmars-d mailing list