Voloda2
Voloda2

Reputation: 12617

I have a very strange crash. Please see my stack trace

My class DownloadViewControl.

@interface DownloadViewControl : UIViewController
{
 IBOutlet UIProgressView *progress;
}
@property (nonatomic, retain) IBOutlet UILabel *chapterLabel;
@property (nonatomic, retain) IBOutlet UILabel *timeLabel;
@property (nonatomic, retain) IBOutlet UIButton *button;

// *.m file

- (void)dealloc {
[chapterLabel release];
[timeLabel release];
[button release];

[progress release];
[super dealloc];
}

I have a very strange crash. Please see my stack trace.

enter image description here

Upvotes: 0

Views: 71

Answers (1)

rickster
rickster

Reputation: 126167

It's hard to tell without the specific error message, but here's my guess:

IBOutlets are by convention not retained, since a subview of your view is already retained by its superview. When you're releasing the progress control it goes away without getting removed from its superview, and then when you call super it releases your view hierarchy, including the progress control which is already gone.

So, you probably don't want [progress release] in there.

Upvotes: 1

Related Questions