programmer-on-the-street
When the bomb drops, the real fun begins, so let's get to work.
Tuesday, June 16, 2009
iPhone dev Stupidity 23: Keep Iterator Valid when Removing Object
Just the same as C++, when deleting objects in an NSMutableArray from head to tail, the iterator/index after the deleting point will be invalid.
To solve: delete from tail to head.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment