Re: Question Regarding the Memory Address of Objects
Re: Question Regarding the Memory Address of Objects
- Subject: Re: Question Regarding the Memory Address of Objects
- From: Scott Ribe <email@hidden>
- Date: Sat, 20 Dec 2008 10:48:41 -0700
- Thread-topic: Question Regarding the Memory Address of Objects
> An NSMapTable can be configured to give either reasonable behavior
> (strong or zeroing weak reference) so use that instead.
Or, in this special case, simply make sure that the dictionary is only used
while the controller is live--especially easy if the dictionary is a private
field of the controller...
I forget the details of the original message, and whether the code has to
dynamically adapt to different sets of outlets. If not, then consider:
enum { kButton1 = 0, kButton2, kText1, ..., kNumOfControls};
id controls[kNumOfControls];
controls[kButton1] = button1;
...
For (int i = 0; i < kNumOfControls; ++i)
[controls[i] doSomething: ...];
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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