Re: Loading a Dictionary
Re: Loading a Dictionary
- Subject: Re: Loading a Dictionary
- From: Kevin Ballard <email@hidden>
- Date: Thu, 3 Feb 2005 21:14:34 -0500
NSDictionary copies keys and retains values. So you can discard any
reference to anything you put in the dictionary - the key is copied, so
is truly owned by the dictionary. The value is retained, so as long as
your retain/releases are balanced, the dictionary will continue to hold
on to it after you let it go.
On Feb 3, 2005, at 8:47 PM, Richard Patterson wrote:
Is there sample code somewhere for how to load entries into an
NSMutableDictionary? My initial effort seems to have created
something crash inducing. I think my mistake is that I assumed the
objects were being copied when they were put into the dictionary.
Does a dictionary only contain a references to an objects that must be
globaly available along with the dictionary?
Should I create an array of objects and then use that to load the
dictionary?
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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