iPhone开发中下载异步图像时崩溃 [英] Crash on download asynchronous images in iphone dev

查看:60
本文介绍了iPhone开发中下载异步图像时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此链接下载异步图像并将其显示到我的表视图同时在下一个视图上使用了同一个异步类,但是当上次使用异步类调用dealloc时,我的应用程序崩溃了.有人请帮助我,在此先感谢.

I am using this link for downloading asynchronously images and display them onto my table view and at the same time i use same asynchronous class onto my next view but when dealloc is called of last time used asynchronous class then my application is crash. Someone please help me on that, thanks in advance.

推荐答案

您已将方法发送到已发布的对象.您可以自己找到它.
请在XCode中为您的方案打开malloc堆栈和僵尸:

You sent a method to a released object. You can find it out by yourself.
Please turn on malloc stack and zombie for your scheme in XCode:

产品->编辑方案->诊断
选中启用僵尸对象"&"Malloc堆栈"

Product -> Edit Scheme -> Diagnostics
check 'Enable Zombie Objects' & 'Malloc Stack'

然后运行该应用程序,XCode在崩溃后应进入调试器模式.在控制台上运行以下命令:

Then run the app, XCode should enter the debugger mode after crash. Run the command below at the console:

info malloc 0x1234567

info malloc 0x1234567

然后您将在控制台中找到哪个对象导致此EXC_BAD_ACCESS.

And you'll find which object cause this EXC_BAD_ACCESS in your console.

这篇关于iPhone开发中下载异步图像时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆