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 06-05-2009, 02:48 PM   #9 (permalink)
MatuX
Registered Member
 
Join Date: May 2009
Posts: 87
Default

Thanks a lot for all your answers, they are helping me a lot for sure!!!

On another note, I'm reading about the Autorelease pool. Did I understand this correctly?
Code:
-(void)myFunc
{
 NSAutoreleasePool * myOwnPool = [[NSAutoreleasePool alloc] init];
 Obj o1 = [[Obj alloc] init];
 Obj o2 = [[Obj alloc] init]; 
 Obj o3 = [[Obj alloc] init];

 [whateverOtherObject setObj:o1]; //obj/setObj property set to retain
 [whateverObject setObj:o2 andObj:o3]; //obj/setObj property set to retain

 [myOwnPool release];
}
Would this automatically release o1, o2, o3 and still keep the memory allocated for "whateverOtherObject" and "whateverObject"?

Thanks!
MatuX is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,677
Threads: 89,155
Posts: 380,392
Top Poster: BrianSlick (7,110)
Welcome to our newest member, Buster2000
Powered by vBadvanced CMPS v3.1.0

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