• 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
Controllers and retains
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Controllers and retains


  • Subject: Controllers and retains
  • From: Sean Gilbertson <email@hidden>
  • Date: Wed, 15 Dec 2004 10:27:03 -0600

	I have an app that uses an NSObjectController to front my real controller, which exports a method that returns an NSArray*.  This array is referenced by an NSArrayController, which is referenced by another, which is referenced by another.  My problem is that an array in my real controller is getting 3 retains, for a total of 4 retains.  Also, my controller is being retained, and I never get into dealloc, which suggests to me that the Controllers are doing retains, but never release.  I don't want to set up controllers and bindings programmatically, and I also do not want to "get around" this retain issue by calling pseudo deallocs in order to finalize my classes.  All my bindings are set up in IB, and all the data I return from my classes (e.g. NSArray*s) are not copies; they are references to my actual data (e.g. NSMutableArray*s).  Am I doing something wrong?  I saw some stuff on the net that suggested that this is a bug in Cocoa, but I'm very skeptical of that claim.

	Please reply to me directly, as I receive mail from this list in a digest.  Thank you.

--
Sean Gilbertson
IT Systems/Software Developer
 _______________________________________________
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

  • Prev by Date: Re: How do I build a Finder window like sidebar?
  • Next by Date: Midi sysex request in new thread
  • Previous by thread: Re: How do I build a Finder window like sidebar?
  • Next by thread: Midi sysex request in new thread
  • Index(es):
    • Date
    • Thread