I declared an instance variable (not static), just a regular variable in the @implementation section. When I accessed that variable from several objects it appeared that all the objects were sharing the same variable, as if I had declared it static!
I then changed the instance variable to a (strong) property (defined in the .m file to make it private) and it started working as expected, with each object getting their own separate version of the property.
What was going on with that weird “sharing” behavior?
You didn’t declare an instance variable. You defined a global variable. You did this:
but you should have done this: