On Sep 15, 2014, at 5:00 PM, Jonathan Mitchell <jonat...@mugginsoft.com> wrote:
> I am using a NIB template, loading the same nib repetitively with a different > owner each time (a non NSViewController subclass). > In the nib there is an NSValueBinding binding to the owner say: > self.itemValue. > This all works fine. > > However, nib owner items are not being dealloc’d. > This behaviour only occurs if the nib contains a binding to self. > 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. Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com