xcode4.5 EXC_BAD_ACCESS调试

1.进入Edit Scheme设置页面。
[img]http://dl.iteye.com/upload/attachment/0079/8764/bfce97b4-0a2f-3ac3-961c-8c40a74298e2.png[/img]
2.在Diagnostics面板中选中Enable Zombie Objects和Malloc Stack选项。
[img]http://dl.iteye.com/upload/attachment/0079/8766/88d440b2-d417-3a01-b014-35aaf9d3be88.png[/img]
3.把xcode4.5默认的Debugger设置为GDB。
[img]http://dl.iteye.com/upload/attachment/0079/8768/7a2e616a-2f52-3d19-adba-2ae35c7eed2c.png[/img]
4.当出现message sent to deallocated instance ******,键入info malloc-history ******。
[img]http://dl.iteye.com/upload/attachment/0079/8773/de692ee8-6689-328b-8c39-037409b5131c.png[/img]
5.根据堆栈信息,定位到内存泄漏的代码。
[img]http://dl.iteye.com/upload/attachment/0079/8777/1e4a0cec-6cd9-3b92-8c84-e3d546e85ff3.png[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值