Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 01-21-2010, 08:32 PM   #3 (permalink)
ykrsdn
Registered Member
 
Join Date: Jul 2009
Posts: 30
ykrsdn is on a distinguished road
Default

Quote:
Originally Posted by shan View Post
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.
ykrsdn is offline   Reply With Quote
 

» Advertisements
» Online Users: 447
13 members and 434 guests
David-T, Davor, djohnson, Duncan C, ElensYang47, Hassasin, jbro, kieshatx65, malkagb91, mdpauley, mer10, Paul10, Rudy
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,436
Threads: 94,026
Posts: 402,590
Top Poster: BrianSlick (7,978)
Welcome to our newest member, ElensYang47
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:10 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.