kesrut
kesrut

Reputation: 682

iOS5 ARC app: __NSAutoreleaseNoPool(): of class NSCFNumber autoreleased with no pool in place - just leaking

I recently switched to ARC for my app project. I'm using iOS 5 SDK. Running one iPod 4g device I don't get any warnings. But trying to run my app on iPod 2g I get many warnings:

*** __NSAutoreleaseNoPool(): Object 0x258070 of class DataModel autoreleased with no pool in place - just leaking
*** __NSAutoreleaseNoPool(): Object 0x2530a0 of class __NSArrayM autoreleased with no pool in place - just leaking
*** __NSAutoreleaseNoPool(): Object 0x25a2e0 of class NSCFNumber autoreleased with no pool in place - just leaking

I guess there's difference between running arm6/arm7 code by using ARC.

How to fix this ? Thanks

Upvotes: 2

Views: 1606

Answers (1)

Michael Dautermann
Michael Dautermann

Reputation: 89509

Wherever you are doing stuff on a separate thread, it'd be smart to add @autoreleasepool contexts.

More information available here.

There's also some decent examples to be found in this related question.

Upvotes: 5

Related Questions