导航控制器中的内存泄漏问题 [英] Memory leak issue in navigation controller

查看:56
本文介绍了导航控制器中的内存泄漏问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行内存泄漏测试.该工具在以下代码的第2行中指示泄漏.是什么原因?

I am doing memory leak testing. The tool indicates a leak in line 2 of the code below. What is the reason?

DailySales *ds = [[DailySales alloc] initWithNibName:@"DailySales" bundle:nil];
[self.navigationController pushViewController:ds animated:YES];
[ds release];

推荐答案

代码看起来不错.您正在模拟器中运行还是在设备上运行?在模拟器上运行仪器可能会产生错误的泄漏报告.

The code looks fine. Are you running in the simulator or on the device? Running Instruments on the simulator can produce false leak reports.

这篇关于导航控制器中的内存泄漏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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