【发布时间】:2014-03-13 14:48:22
【问题描述】:
我的应用程序在 [super dealloc]; 行和 - (void)dealloc 方法中崩溃,我正在释放所有保留在 .h 类中的对象,崩溃报告是
-[__NSArrayI respondsToSelector:]: message sent to deallocated instance 0x86fb1a0
-[__NSArrayI respondsToSelector:]: message sent to deallocated instance 0x86fb1a0
-[__NSArrayI respondsToSelector:]: message sent to deallocated instance 0x86fb970
-[UIButton release]: message sent to deallocated instance 0x9b914b0
但是当我阻止[super dealloc]; 时发生了什么,此行代码运行良好,但它给了我警告Method possibly missing [super dealloc] call。如果有人知道请帮助我在哪里做错了。提前致谢。
已编辑
[_gf_Knowledge_ratingStars release];
[_gf_Range_ratingStars release];
[_quality_ratingStars release];
[_atmosphere_ratingStars release];
[_reviewtxt release];
[_whatsGoodHere release];
[_saveButton release];
[_screen_title release];
[_commentImageView release];
[_resturantBGImageView release];
[_textViewPlaceholder release];
[_gFKnowledgeUnselectBtn release];
[_gFRangeUnselectBtn release];
[_gualityUnselectBtn release];
[_atmosphereUnselectBtn release];
[_gFKnowledgeLbl release];
[_gFRangeLbl release];
[_gualityLbl release];
[_atmosphereLbl release];
[_navbarImageView release];
[_btnBack release];
[super dealloc];
【问题讨论】:
-
你在某处过度发布了一些东西。
-
你发布的实例也是由super发布的吗?
-
它的超类是UIViewController,所以我在这个项目中不关心UIViewController,所以我在超类中什么都不做。
-
提供dealloc方法内的代码。放置一个特殊的断点,您将在某些时候获得错误的访问权限..您可以轻松解决该问题
-
我花了很多时间在它上面,它确实在 super dealloc 行上崩溃了。
标签: iphone ios xcode crash-reports