当你遇到"modifying layer that is being finalized"的时候怎么办?
2012-03-22 14:58
295 查看
UIView *view = [[UIView alloc] init] autorelease]; [THE_SUPER_VIEW addSubview:view]; [view release]
这个时候,当程序运行到[view release]的时候就会出现如题所说的问题。所以,如果view已经被释放(包括动态释放),那么就不要再调用release方法了,因为当这个view从其父view中被移除的时候,也会被释放。
我遇到这样一个问题,我push出一个tableview,在push出的这个tableview里面,一个UITableView类型的全局实例变量contentTableView,用于创建tableview,我在viewdidload里面contenTableView=[[UITanleView alloc]init];随后释放掉了,我又在dealloc里面释放掉了,结果在ios4上面crash了,原因是"modifying layer that is being finalized",但在ios5上面运行是ok的。
相关文章推荐
- 当你遇到"modifying layer that is being finalized"的时候怎么办?
- modifying layer that is being finalized
- modifying layer that is being finalized
- modifying layer that is being finalized
- 提交时卡在"Your application is being uploaded"时,怎么办?
- 编译器&调试---Android项目遇到"TheType R is already defined"
- 执行CreateObject("Scripting.FileSystemObject")代码遇到"Operation is disallowed in this session"问题
- xcode在真机调试的时候出现"The identity used to sign the executable is no longer valid"
- PostgreSQL创建数据库时报错:ERROR: source database "template1" is being accessed by other users
- xcode在真机调试的时候出现"The identity used to sign the executable is no longer valid"
- Android项目遇到"TheType R is already defined"
- 在做动态添加删除行的时候,使用jquery遇到的问题:$("#participantList tr").eq(i).remove();
- dojo解决这个问题Tried to register widget with id=="myid" but that id is already registered
- InfoPath error : "a dataset that contains a table name that is defined more than once"
- 编译时遇到 "Undefined reference to vtable for ***" 错误怎么办?
- iOS 字符串长度计算boundingRectWithSize遇到 " \r\n"的时候,后面的字符串长度返回0 在swift中使用pod导入第三方库时,注意事项
- 错误 the type "xxxx" is defined in an assembly that is not refernced.You must add a reference to assem
- 经常遇到Please ensure that adb is correctly located at 'D:\java\sdk\platform-tools\adb.exe' and can be e
- "report is being generated " 但就是不显示结果的原因
- Android项目遇到"TheType R is already defined"