There are two differences:
The first is that in the original block of code, we release the object pointed to by items and we also set the variable items to point at nil. Therefore, the NSMutableArray that items used to point at is gone and you can’t accidentally access that memory later by referencing the items pointer. (Of course, in this application, there really isn’t a “later”)
The second difference is that by sending an object release, you immediately release it. If its retain count is one, it is immediately deallocated. If you autorelease it, the release of the object is delayed. In this simple command line application, it doesn’t matter, there is nothing else happening. But in an iPhone application, this might matter, especially in low memory conditions.
The rule is that if you don’t need an object any more, you release it on the spot. You only use autorelease if you have ownership of an object that you are giving away - usually, because you are creating this object yourself and returning it to the caller. By autoreleasing an object you could have released, you delay the inevitable and add complexity to debugging a retain count problem later.