digitalmars.D.learn - The best way to remove an element from DList while iterating over the
- Ivan (20/20) Aug 31 2020 Hello!
Hello! I've been trying to implement something like that: struct Element { bool isPendingRelease; } DList!Element elements; void FreePendingElements() { foreach(ref elem; elements) { if (elem.isPendingRelease) { // remove it here from elements } } } What's the best way to implement the logic I want? Thanks, Ivan
Aug 31 2020