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 11-05-2009, 08:49 AM   #10 (permalink)
Max
Registered Member
 
Join Date: Oct 2009
Posts: 4
Default

this tutorial is great, but I'm still a bit confused about autorelease stuff:

In this example:

Code:
-(void)doSomething
{
    SomeObject *obj = [[[SomeObject alloc] init] autorelease];
    self.obj = obj;
}

When does autorelease get called on *obj value? After doSomething method ends or in the current class dealloc?

Then again, in this code:

Code:
-(void) logValue:(int)intValue
{
    NSLog(@"%@", [NSString stringWithFormat:@"%d", intValue]);
}
When does stringWithFormat value get destroyed? After logValue ends or somewhere after current class dealloc?

Last edited by Max; 11-05-2009 at 08:54 AM.
Max is offline   Reply With Quote
 

» Advertisements
» Online Users: 290
20 members and 270 guests
ADY, antonwilliams, dacapo, dcool, HemiMG, iosdevjtp, jakerocheleau, leahov, MarkC, masc2279, morands, MozyMac, PsychoChris, sly24, smithdale87, sneaky, Sunny46, thh022, timle8n1, vogueestylee
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,222
Posts: 380,720
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

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