When to use nsautoreleasepool??



When to use nsautoreleasepool??..

Answer / Prabhakar Singh

In Objective-C, you should use the `NSAutoreleasePool` when you have multiple objects that need to be released one after another, but you don't know exactly where or when they will be released. By using an autorelease pool, these objects are automatically released at specific points in time during the runloop.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?

1 Answers  


How to call function in objective-c?

1 Answers  


Is a fact objective?

1 Answers  


Distinguish between @synthesize and @dynamic in objective –c?

1 Answers  


How to create thread in objective c?

1 Answers  


Explain the difference between #import and #include in objective-c?

1 Answers  


What is toll-free bridging and when is it useful?

1 Answers  


What are the three main types of property?

1 Answers  


How the class “implementation” is represented in objective-c?

1 Answers  


What is .m file in objective c?

1 Answers  


What is a hash string?

1 Answers  


Is it possible to implement dealloc in arc?

1 Answers  


Categories