I believe he IS taking advantage of an auto-retained property, which is why he needs the release... because the property setter has issued its own retain, which will be released when the property is set again...
So in dealloc I could call your function, but there are things in various object packing schemes (KVO most importantly) where calling the setter like that screws stuff up. It's better to just call the getter (which should be side effect free) and release the returned object.
So looking at retain counts in the original example:
If anyone does KVO on your object, they will be sent a "property changed" notification when you call self.myvar = nil in your dealloc method.
It's quite likely that whoever gets notified of the property change will attempt to access your object, but now your object is in a half-destroyed state.