Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
iPhone Memory Management Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhone Memory Management Question



This probably isn't iPhone specific but that's the platform I'm currently working on so I just thought I'd make that clear.

I've recently read the Memory Management Guide and am a little confused with my current situation. I have a RootViewController which is responsible for several other UIViewControler objects. Each child UIViewController holds a reference to the parent RootViewController. I currently have this all set up using outlets. So each child UIViewController's parent outlet is connected to the RootViewController. I'm confused on how I should manage the retention and release of the RootViewController. I initially manage the RootViewController in the AppDelegate which releases the RootViewController on dealloc. If this is the case then I shouldn't have to worry about releasing the RootViewController parent outlet in the child UIViewController's, correct? Retention is still a little nebulous to me, but I should also retain rather than assign when creating the parent property since retain is declaring ownership (still confuses me) rather than creating a copy (that's what the copy keyword is for), correct?

Thanks for any input.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.