gpt4 book ai didi

ios - 我遇到了一次非常奇怪的崩溃。请查看我的堆栈跟踪

转载 作者:行者123 更新时间:2023-11-29 04:45:08 25 4
gpt4 key购买 nike

我的类 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 文件

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

[progress release];
[super dealloc];
}

我遇到了一次非常奇怪的崩溃。请查看我的堆栈跟踪。

enter image description here

最佳答案

如果没有具体的错误消息,很难判断,但这是我的猜测:

IBOutlets 按照惯例不被保留,因为 View 的 subview 已被其父 View 保留。当您释放 progress 控件时,它会消失,而不会从其 super View 中删除,然后当您调用 super 时,它会释放您的 View 层次结构,包括 progress 控制已经消失了。

所以,您可能不希望其中有[progress release]

关于ios - 我遇到了一次非常奇怪的崩溃。请查看我的堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9773732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com