iphone - mutableArray cannot store nil objects
- by Mike
I have a mutable array that is retained and storing several objects. At some point, one object may become nil. When this happens the app will crash, because arrays cannot have nil objects. Imagine something like
[object1, object2, object3, nil];
then, object2 = nil
[object1, nil, object3, nil];
that is not possible because nil is the end of array marker. So, how can I solve that? thanks for any help.