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 04-27-2009, 03:41 PM   #3 (permalink)
vishal
Vishal
 
Join Date: Feb 2009
Location: Pune, India
Posts: 76
vishal is on a distinguished road
Default

Quote:
Originally Posted by jsd View Post
You need to retain optionsViewController and navControllerSettings (although I'd probably use autorelease in this case.)

Very simple rules for memory management in Cocoa

Code:
optionsViewController *optionsView = [[[optionsViewController alloc] initWithNibName:@"optionsView" bundle:nil] autorelease];
navControllerSettings = [[[UINavigationController alloc] initWithRootViewController:(UIViewController *) optionsView] autorelease];
I'm far from a Cocoa memory management expert but I do know one key rule: If you alloc/init something, you MUST follow up with retain/release or autorelease. Put that on a sticky on the side of your monitor.
Hi,

Thanks for the reply, but this won't helped me. It is still crashing. I tried with retain, autorelease and release.

Vishal N
vishal is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,623
Threads: 94,087
Posts: 402,801
Top Poster: BrianSlick (7,990)
Welcome to our newest member, chanjackie113
Powered by vBadvanced CMPS v3.1.0

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