12 Mar 2012
See this example:
// In the init function UIView *v = [[UIView alloc] init]; [self addSubview:v]; _someVar = v [v release]; // In the dealloc function [_someVar release]; _someVar = nil;
Here is what caused the
`EXC_BAD_ACCESS`, and it took me like 2 hours to solve it.
`_someVar` is released twice. It's super confusing.
Next time, just use
And, when I want to release it, just set the property to nil.
You cannot really go wrong with