I'm not sure how to deal with releasing this object:
h:
@interface AHImageView : UIScrollView
{
UIImageView *imageView;
}
@property (nonatomic, retain) UIImageView *imageView;
.m:
-(id)initWithFrame:(CGRect)frame {
self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
[self addSubview:self.imageView];
}
-(void)dealloc {
[super dealloc];
self.imageView = nil;
[self.imageView release];
}
The error i'm getting is:
Incorrect decrement of the reference count of an object that is not owned at this point by the caller
and this error points to the [self.imageView release];
line.