Hope this helps ARC - Automatic Reference Counting was introduced since iOS4. And currently ARC is the most common and the best practice for iOS development. MRC - Manual Reference Counting is where you have to DIY.
With these it helps The most important thing to take away here: The assignment operator = never mutates (i.e. changes) an object. Mutating an object can only be accomplished by sending it messages (e.g., sending appendString: to an NSMutableString). The assignment operator simply causes a pointer to point to a different object than it did before. Thus, it is incorrect to say:
(1) NSString * test = [[NSString alloc] init];
(2) test = @"msg";
around this issue The first rule to remember when you're dealing with memory management in Objective-C is that you're responsible for anything that you (1) allocate (using alloc), (2) new up (using new), (3) copy (using copy), or (4) retain (using retain). In those four cases, you must explicitly release (or autorelease) those references. In your example, since you allocated recipeView, you must release it once it's added to the navigation controller.
seems to work fine If it's not a pointer, then the C++ object will form part of the Objective-C object itself. So if the C++ object is 12 bytes then when you alloc the Objective-C object, 12 bytes of that object are reserved for the C++ object. So, whenever the Objective-C object is deallocated, those bytes that the C++ object is held in are destroyed along with the Objective-C object. It's no different to have any instance variables in an Objective-C object.