• 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
Automagically retained array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automagically retained array


  • Subject: Automagically retained array
  • From: Antonio Nunes <email@hidden>
  • Date: Sun, 2 Jul 2006 19:01:19 +0100

Hi,

In my app the user can bring up an editor. When its window is inited I call a method that initialises an array that is an instance variable of the window controller. At the end of the init method, immediately before it returns, the retain count for that array is 1.

The next time the framework enters code in the window controller, on awakeFromNib, putting a break point there at the first line of code and then checking the retain count of the array gives a count of 4.

The array is bound to an NSArrayController, and when the controller awakes from NIB, the array, also there, already has a retain count of 4.

Anybody any ideas what causes the array to be retained these additional times?

Thanks,
António

-----------------------------------------------------------
And you would accept the seasons of your
heart, even as you have always accepted
the seasons that pass over your field.

--Kahlil Gibran
-----------------------------------------------------------



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


  • Follow-Ups:
    • Re: Automagically retained array
      • From: mmalc crawford <email@hidden>
    • Re: Automagically retained array
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: NSUserDefaults from within a bundle
  • Next by Date: Re: Automagically retained array
  • Previous by thread: Re: NSUserDefaults from within a bundle
  • Next by thread: Re: Automagically retained array
  • Index(es):
    • Date
    • Thread