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 09-06-2008, 08:56 AM   #10 (permalink)
danzaph
New Member
 
Join Date: Jul 2008
Posts: 91
Default

Quote:
Originally Posted by ckcheng View Post
To properly create a property with code (that is, not a UI control from Interface Builder) in "init" method, *always* retain your property.

myNSMutableArray = [[NSMutableArray alloc] initWith....];
should be
myNSMutableArray = [[[NSMutableArray alloc] initWith....] retain];
This is totally incorrect, alloc automatically retains as do methods with new or copy in them. The connivence class methods return a retained and autoreleased item and need to be retained it need be.
danzaph is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,747
Threads: 89,202
Posts: 380,573
Top Poster: BrianSlick (7,129)
Welcome to our newest member, sherlopez1
Powered by vBadvanced CMPS v3.1.0

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