LoginSignup
2
2

More than 3 years have passed since last update.

[Objective-C] Collection was mutated while being enumerated

Last updated at Posted at 2016-01-07

高速列挙を使い配列から要素を削除しようとしたら「Collection was mutated while being enumerated」というエラーが出た

列挙中に配列の要素を削除すると、それより後ろにある要素の全てが「1つ前」へ移動することになり、順番に処理をしていくことができなくなっておかしくなってしまうらしい。。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2