Controllers and retains
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