Re: Nib unloading and ARC
Re: Nib unloading and ARC
- Subject: Re: Nib unloading and ARC
- From: Jonathan Mitchell <email@hidden>
- Date: Tue, 16 Sep 2014 09:17:04 +0100
On 15 Sep 2014, at 23:16, Ken Thomases <email@hidden> wrote:
> On Sep 15, 2014, at 5:00 PM, Jonathan Mitchell <email@hidden> wrote:
>
>> Or should I refactor to make each NIB owner an NSViewController instance?
>
> Yes.
>
> From the release notes when NSViewController was originally introduced:
> https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKitOlderNotes/#NSViewController
>
>> A new class, NSViewController, has been added to the AppKit in Mac OS 10.5. It serves roughly the same purpose as NSWindowController, but for views instead of windows. It:
>> • Does the same sort of memory management of top-level objects that NSWindowController does, taking the same care to prevent reference cycles when controls are bound to the nib file's owner that NSWindowController began taking in Mac OS 10.4.
Thanks for pointing me back to the original NSViewController release notes.
Using it as the file’s owner does indeed solve the issue.
All the best
Jonathan
_______________________________________________
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