简体   繁体   中英

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.

在此处输入图片说明

在此处输入图片说明

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. 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?

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! )

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!

UPDATE:

SOLUTION is in the replies at @mit3z's answer! @babbidi answer!

If you have your outlets as properties and you don't release them in dealloc - then yes, you'll get a leak. It's hard to tell without seeing Area2 @interface declaration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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