Yes, more specifically, likely, it initializes the retain count to 1.
Is it the same as having [sushiTypes retain]. I know if we call retain, the object will be held until we released it.
Not the same. That will increase the retain count twice. There's not much reason to increase the retain count twice in the same place. If you did do that, you'd be responsible for calling release twice.
you have a retained sushiTypes. This sushiTypes was passed to a function as an argument. Later in the function you released it. Will it release the memory of the sushiTypes? if it is, does the sushiTypes no longer existed.
First, you should make sure that you understand that whether release frees memory or not depends on if there are other owners that are holding a reference to the object. If more than one thing has [_sushiTypes release] retained the object, then release will not free the memory in that case.
Second, bad idea. To keep sanity with reference counting, you should follow certain patterns.
retain (or alloc) instance variables, release them in dealloc or before.
retain (or alloc) local variables if needed, and release them before you exit the method.
The caller does not own the return value of a function. That implies that you handle a function return value like a local variable, but autorelease it before you return it instead of releasing it. That ensures it will last at least long enough for the caller to retain it, if needed.
One of the patterns is not for a method caller to own a reference to a method argument, but when the function returns the caller does not own the reference. The method should not release the caller's reference.
Follow on with 2.1, instead of releasing sushiTypes. I created a local variable NSArray *sushiTypes = _sushiTypes. If I released sushiTypes will it also release sushiTypes. Or if I retain sushiTypes, will it retain _sushiTypes as well.
retain and release are sent to objects, not references. sushiTypes and _sushiTypes refer to the same object, so it's the same calling retain or release on one as on the other.
It is legitimate, but probably unnecessary, to [sushiTypes retain] and later in the same method [_sushiTypes release]. But do not do [sushiTypes release] only, thereby expropriating _sushiTypes's ownership of the object.