Re: ARC problems
Re: ARC problems
- Subject: Re: ARC problems
- From: Allan Odgaard via Cocoa-dev <email@hidden>
- Date: Wed, 04 Sep 2019 01:11:34 +0200
On 4 Sep 2019, at 0:18, Turtle Creek Software via Cocoa-dev wrote:
The startup code was created 3 years ago when we were new to Cocoa,
probably from one of the HIllegass books.
Do you manually load nibs (as opposed to rely on the framework to load
MainMenu.nib)?
In a previous post you wrote:
Our app delegate class is not deallocated. The window controller is
deallocated despite the member reference there. If we keep the second
strong reference to the controller, then the outline view is
deallocated instead. Nothing references the view except being in the
.xib file for the window controller.
We had similar problems with a NSTabViewer. When we futzed the build
settings to allow
To me it sounds like your nib is not being retained. This one contains
the app delegate as a top-level object, so this gets released unless
something else retains it (like when you had the main window controller
retain the app delegate with a strong back-reference, but then you saw
views being released instead).
So you need to look at the setup code, if it is using modern NSNib
loading methods, it will need to keep the array of top-level objects
(and the nib itself) retained for the duration of the program.
The nib is (it sounds) the root of your ownership hierarchy, and you are
retaining objects further down the tree, which doesn’t correctly fix
the problem.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >ARC problems (From: Turtle Creek Software via Cocoa-dev <email@hidden>) |
| >Re: ARC problems (From: Jean-Daniel via Cocoa-dev <email@hidden>) |
| >Re: ARC problems (From: Turtle Creek Software via Cocoa-dev <email@hidden>) |