IOS:从视图控制器退出时崩溃
我有一个奇怪的问题:在我的应用程序中,我有一个滚动视图,其中有 20 个按钮;使用这些按钮您可以打开第二个视图控制器;如果您按下一个按钮(例如第一个按钮),它会打开带有图像的第二个视图控制器,如果您按下另一个按钮,它会打开第二个视图控制器,但带有另一个图像;我的问题是,在我打开 SecondViewController 20(大约)次后,我的应用程序崩溃了,消息是
-[UIImage isKindOfClass:]: message sent to deallocated instance 0x180200
但我不知道问题是什么;在 SecondViewController 内,我释放了所有资源。
I have a strange problem: in my app I have a scrollview where are 20 buttons; with these buttons you can open a secondviewcontroller; if you push a button (example first button) it open secondviewcontroller with an image, if you push another button it open secondviewcontroller but with another image; my problem is that after 20 (about) times that I open secondviewcontroller my app crash and the message is
-[UIImage isKindOfClass:]: message sent to deallocated instance 0x180200
but I don't know what is the problem; inside secondviewcontroller I dealloc all the resource.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看您的代码肯定会有帮助。话虽这么说,这听起来可能是内存问题。通过 Instruments 运行应用程序并检查分配和泄漏。
Seeing your code is definitely going to help. That being said, this sounds like it could be a memory issue. Run the application though Instruments and check for allocations and leaks.