Yes; in theory. In practice it might be simpler to just document that callbacks should not modify the list.
To iterate efficiently and support callbacks that can delete entries you ideally want a callback that returns a flag to tell the loop to do the deletion (and update the iterator appropriately).
Yes; in theory. In practice it might be simpler to just document that callbacks should not modify the list.
To iterate efficiently and support callbacks that can delete entries you ideally want a callback that returns a flag to tell the loop to do the deletion (and update the iterator appropriately).