I\'ve got a very basic example where I\'m reading some data into a class from JSON, and my objects are getting corrupted somehow. I suspect I\'m missing some detail about how pr
This is not a ivar:
@implementation ANBNote
NSArray * _references;
it's a global. There's only one for all the instances of your class, not one for each. When the next instance sets it, the previous instances see the new values because it's the same variable. You need to put it into curly braces to make it an ivar:
@implementation ANBNote
{
NSArray * _references;
}
There's no need to declare the variable explicitly, though -- you can still implement accessors yourself and let the compiler create the ivar as long as you use the default synthesized name (underscore + property name).