即使我们不拥有(alloc/new/copy)那个 ivar,我们是否必须在 dealloc 中释放 ivar?
例如,这是正确的吗?
-(void)dealloc {
[_aUIImageIvar release];
[super dealloc];
}
-(id)init{
self = [super init];
if (self) {
_aUIImageIvar = [UIImage imageWithData:data];
}
}