When I declare the synthesis a property like this:
@syntesize myObject = _myObject;
I can access _myObject directly in code, while avoiding the synthesized getters and setters.
However, if I synthesize the property like this
@syntesize myObject = myObject;
will I no longer be able to access the instance variable hidden behind = myObject? Should I have a preference in using one or the other. Because I have often experienced “BAD_ACCESS – problems” when using _myObject instead of self.myObject.
In both cases you can access the underlying ivar. In both cases you should avoid doing so. Use accessors everywhere except init, dealloc and within accessors themselves. This will avoid many headaches, with or without ARC.
That said, if you’re getting
EXC_BAD_ACCESSwhen accessing the ivar under ARC, you likely are doing one of the following:__bridgeassignor__unsafe_unretainedunsafely