[This is really a comment because I point to another problem, but I need a code formatting function].
Never do this:
[self.randomVar release]
This frees the object that ivar support points to, but does not make the pointer itself null. This means that now you may have a sagging pointer if the object is freed as a result of the release. Or do this:
self.randomVar = nil;
or
[randomVar release];
The first form is preferred everywhere except dealloc.
Jeremyp
source share