- Date added
-
May 22, 2015, 3:04 p.m.
- Description
- You get a collection from somewhere and enumerate it — and then you get an error about the collection being mutated as it was being enumerated. The app crashes.
You can avoid this unhappy fate with one simple trick: don’t enumerate mutable collections.