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

wow, thanks a lot, it's more clear

So I guess it will be like this:

Code:
-(void)doSomething
{
 SomeObject *obj = [[[SomeObject alloc] init] autorelease]; // count 1
 self.obj = obj; // count becomes 2

//( can put some additional code here)

} // count back to 1
and in second case:

Code:
-(void) logValue:(int)intValue
{
    NSLog(@"%@", [NSString stringWithFormat:@"%d", intValue]); // count 1

// (some additional code)
// value is still there somewhere with count 1

} // count becomes 0, value destroyed
is it correct?

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

» Advertisements
» Online Users: 341
14 members and 327 guests
ADY, antonwilliams, dacapo, dcool, HemiMG, jakerocheleau, leahov, michelle, MozyMac, nobre84, sly24, smithdale87, thh022, vogueestylee
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,222
Posts: 380,721
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:19 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.