Quote:
Originally Posted by shan
Basically what is happening to you is you are assigning the var dict to point to the nsdictionary but not telling the system to retain it. When editDict goes out of scope the dictionary you are referencing is deallocated. You need to retain it.
What to do will depend on how you created the var "dict".
If you simply declared the var at the class level then:
dict = [editInfo retain];
If you also created a property for it with (nonatomic, retain) then
self.dict = editInfo (or [self setDict:editInfo] is the same thing)
|
Oh, thanks! I forgot to retain the variable. Now that you mention it, it makes sense.