[Issue 13279] [dmd-2.066-rc2] Invalidated state of DList with linearRemove

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 11 05:51:47 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13279

--- Comment #5 from NCrashed at gmail.com ---
Thank you a lot, @monarchdodra! I was part of legacy code and the main idea was
"don't touch while it works!". Modifying collection while iterating over is
really horrible idea.

Thus my list does much more deletion operations than addition ones, I simply
fills new list with remaining elements and swaps two lists at the end of
iteration. 

Invalid.

--


More information about the Digitalmars-d-bugs mailing list