• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Nib unloading and ARC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nib unloading and ARC


  • Subject: Re: Nib unloading and ARC
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 15 Sep 2014 17:16:06 -0500

On Sep 15, 2014, at 5:00 PM, Jonathan Mitchell <email@hidden> 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 (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


  • Follow-Ups:
    • Re: Nib unloading and ARC
      • From: Jonathan Mitchell <email@hidden>
References: 
 >Nib unloading and ARC (From: Jonathan Mitchell <email@hidden>)

  • Prev by Date: Nib unloading and ARC
  • Next by Date: Updating Content of NSFileWrapper
  • Previous by thread: Nib unloading and ARC
  • Next by thread: Re: Nib unloading and ARC
  • Index(es):
    • Date
    • Thread