views:

30

answers:

1

How AutoReleasePool working in iphone? And when will be the objects released?

+2  A: 

At the end of the current iteration of the run loop.

Alex Reynolds
Thanks alex. Can you explain with example? If i am using initWithString for NSString,Where it will release the memory?At the end of the method?
vinay
initWithString is not autorealesed - you should release it by yourself...
Michael Kessler
@vinay: You should probably read Apple's Memory Management Guide as this will answer many of your questions: http://developer.apple.com/iphone/library/documentation/cocoa/conceptual/memorymgmt/memorymgmt.html
Alex Reynolds