0

Why we use @autoreleasepool in ios 5?

My point is ios 5 has no autorelease,release,retain.but we use @autoreleasepool in main class. pls give me a solution.

What is the use of autoreleasepool inside a method?

Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
Snaking
  • 61
  • 7

1 Answers1

0

It seems you're using ARC (Automatic Reference Counting) this means you are not allowed to use autorelease, release and retain but the Compiler automatically includes these Statements at the correct Position. ARC is not a Runtime feature, but a compiler feature. that's why you nonetheless need the @autoreleasepool.

see also: @autoreleasepool without ARC?

Community
  • 1
  • 1
sensslen
  • 780
  • 8
  • 17