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

Thread: What to Release
View Single Post
Old 04-06-2009, 05:57 PM   #2 (permalink)
Kalimba
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Kalimba is on a distinguished road
Default

Quote:
Originally Posted by DenVog View Post
In the following example, should you release versionCombined because that is the string that is initially allocated, or versionLabel since that's what the string is ultimately assigned to?

Code:
- (void) versionLabel {
	NSString *versionShort = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
	NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey];
	NSString *versionCombined = [[NSString alloc] initWithFormat:@"%@ (%@)", versionShort, version];
	versionLabel.text = versionCombined;
 }
Thanks for clarifying.
In this code, you are responsible only for "versionCombined", because you are alloc/init-ing it.
Kalimba is offline   Reply With Quote
 

» Advertisements
» Online Users: 425
16 members and 409 guests
7twenty7, buggen, BumChinBooth, drviii, gogoman, Kieren Harrold, kukenwa, legolug90, muhimranss, nor9849, QuantumDoja, Raffaello, sunlite, syam_mchrome, themartist, yvonneolivia
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,633
Threads: 94,090
Posts: 402,805
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nor9849
Powered by vBadvanced CMPS v3.1.0

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