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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-05-2009, 12:47 PM   #8 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Default

Quote:
Originally Posted by MatuX View Post
And what if the property is set to assign instead of retain? When I do "release" I will render the allocated memory unusable?
Must I check for every property if its set to assign or retain every time I use it?
Nope. That's not your job. Your job is to balance your own retains and releases. (Of course, if you wrote the class that's getting the property, you're responsible for making it sure it works correctly.)

Release does not necessarily deallocate the object - only if its retain count drops to zero.

If you alloc an object, then assign it to a property of another class, you can go ahead and release it when you're done with it. It's up to the other class to have retained it (if it needs to). You shouldn't worry about it. Remember, as long as there's at least one retain on it, the object will not go away.

If you're worried about premature releases, check out the NSZombieEnabled flag. FCS Blog NSZombieEnabled for the debugger adverse
jsd is offline   Reply With Quote
 

» Advertisements
» Online Users: 724
17 members and 707 guests
ADY, at0m87, ben555, Dalia, Don, fgreg2692log, foolshityella, jakerocheleau, John_smiths, jollyrgr, Khurshid, Mariusz Kowalczyk, PeterBishop, shiv@globussoft.com, suresk, ujtordai
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,632
Threads: 89,150
Posts: 380,346
Top Poster: BrianSlick (7,110)
Welcome to our newest member, foolshityella
Powered by vBadvanced CMPS v3.1.0

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