Mar*_*ett 5 iphone memory-management objective-c
从后台线程调用dealloca 是错误的UIViewController吗?似乎UITextView(可以?)最终调用_WebTryThreadLock哪个导致:
bool _WebTryThreadLock(bool):试图从主线程或Web线程以外的线程获取Web锁.这可能是从辅助线程调用UIKit的结果.
背景:我有一个子类NSOperation,它接受一个selector和一个target对象通知.
-(id)initWithTarget:(id)target {
if (self = [super init]) {
_target = [target retain];
}
return self;
}
-(void)dealloc {
[_target release];
[super dealloc];
}
Run Code Online (Sandbox Code Playgroud)
如果在UIViewController开始NSOperation运行时已经被解雇,那么调用将在后台线程上release触发它dealloc.
| 归档时间: |
|
| 查看次数: |
4632 次 |
| 最近记录: |