Phil
Phil

Reputation: 461

NSMutableArray remove Object is cloning another object in the Array

I have an strange error after removing an object in a NSMutableArray.

Before deleting an object

If i remove an object with

[Array removeObjectAtIndex:2];

the array changed to this:

enter image description here

why are there now 2 ContactViewControllers??

Upvotes: 4

Views: 265

Answers (1)

ahwulf
ahwulf

Reputation: 2584

lldb lies sometimes. It gets confused and will display the incorrect information. Try doing

po Array

you should see the correct array contents then.

Upvotes: 7

Related Questions