简体   繁体   English

遗弃的内存,泄漏,导航控制器

[英]Abandoned Memory, Leaks, Navigation Controller

I can't understand this behaviour in my app and I'm seriously thinking burn my mac NOW and start writing books of stories for children. 我在应用程序中无法理解这种行为,我正在认真考虑立即刻录Mac并开始编写儿童故事书。

在此处输入图片说明

在此处输入图片说明

I have a normal Navigation Controller, and i push and pop viewcontrollers from it. 我有一个普通的导航控制器,并从中推送和弹出了视图控制器。

I'm doing a basic transition between views and I'm realising everything that I'm retaining or copying or whatever. 我正在视图之间进行基本的过渡,并且意识到要保留或复制的所有内容。 But Instruments STILL identifies abandoned memory, and says that line is the responsible for that. 但是Instruments STILL会识别出废弃的内存,并说这是造成这种情况的原因。 I can't understand. 我听不懂 What I'm forgetting? 我忘记了什么? In Area2 I have few outles and one UIImageVIew, do I need to realising them to, in some way? 在Area2中,我很少有出局和一个UIImageVIew,是否需要以某种方式实现它们?

One more thing, if use Leaks inspector that same line is identified as a leak.. Really, I'm capable to destroy de entire world! 还有一件事,如果使用泄漏检查器将该同一行标识为泄漏。。确实,我有能力摧毁整个世界!

Please, can someone help me and tell me what I'm doing wrong and / or forgettting? 请,有人可以帮助我,告诉我我做错了什么,和/或忘记了吗?

( Iniatly I had self.navigationController instead of delegate.navigationController, but the problems occurs to! ) (起初,我有self.navigationController而不是proxy.navigationController,但是问题发生了!)

Just this: 只是这个:

#import 

    @interface Area2 : UIViewController
    {
        IBOutlet UIButton * btBack;
    }

    # pragma mark - Navigation Controller
    - (IBAction)goBack:(id)sender;
    - (IBAction)goGaleria:(id)sender;

When I do Analyze ( Menu: "Product"->"Analyze" Xcode 4.2 ) give me build succeeded! 当我进行分析(菜单:“产品”->“分析” Xcode 4.2)时,给我构建成功!

UPDATE: 更新:

SOLUTION is in the replies at @mit3z's answer! 解决方案在@ mit3z的答复中! @babbidi answer! @babbidi回答!

If you have your outlets as properties and you don't release them in dealloc - then yes, you'll get a leak. 如果您将网点作为属性,并且没有在dealloc中释放它们-是的,您会泄漏。 It's hard to tell without seeing Area2 @interface declaration. 不看Area2 @interface声明就很难分辨。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM