I have a .xib file containing a UIView and 2 UILabel subviews linked to a class named Note with outlets assigned to each label appropriately, the definition for this class contains the following.
@interface Note : UIView {
IBOutlet UILabel *time;
IBOutlet UILabel *content;
}
I'm constructing this with the following code
NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"Note" owner:self options:nil];
note = [nibViews lastObject];
[self addSubview:note];
Now, in my Note class dealloc phase, I'm not releasing either time or content, but I'm wondering if I should?
- (void)dealloc {
[super dealloc];
}
I'm assuming I don't because I'm not explicitly retaining these objects anywhere in my code, and I don't synthesize these into getter/setters. But I don't know enough about nib unarchiving to know whether I should be releasing these in my dealloc phase or not?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…