I get a crash when hitting the camera button, which triggers the ItemDetailViewController’s viewDidUnload: method. So I traced the crash to the setting of the properties such as (nameField) to nil. In the book, the properties are set to nil after being released like this:
nameField = nil;
However, the code generated by control dragging to create the outlets produced this instead:
This difference causes a crash. Reverting from the latter to the former stops the crash. So my question is, what is the difference between the two methods of setting the instance variable to nil, and why does the latter cause a crash?