Reputation: 12018
Very new to iPhone app development.
I am developing one example application for iPhone emulator using Objective-C++ and CPP.
I am getting following errors, and i don't understand why i am getting these errors.
2002-1-4 11:11:11.649 myApp[912:592f] *** _NSAutoreleaseNoPool(): Object 0x1b0d2d0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x305a2e6f 0x30504682 0x7c93 0x7b92 0x30d8 0x6ee2 0x1ae95e 0x6013 0x3496 0x43ca 0x39923b 0x3ca0a0 0x3ca121 0x3a1e 0x926d8155 0x926d8012)
2002-1-4 11:11:11.650 myApp[912:592f] *** _NSAutoreleaseNoPool(): Object 0x4f02470 of class __NSArrayReverseEnumerator autoreleased with no pool in place - just leaking
Stack: (0x305a2e6f 0x30504682 0x7c93 0x7b92 0x30d8 0x6ee2 0x1ae95e 0x6013 0x3496 0x43ca 0x39923b 0x3ca0a0 0x3ca121 0x3a1e 0x926d8155 0x926d8012)
Is memory leak in my app is causing these errors, I get number of these kind of errors. I have one function which updates table view and when that function gets called at that time i gets these errors, in that function i am add elements to one std::vector and then calling [mTableViewList reloadData]; to update the table view.
OSX version: 10.5.8 and Xcode version: 3.1.3
Upvotes: 0
Views: 57
Reputation: 50089
the error means there is no pool in place yet. you need to do that on every thread whenever you are about to call cocoa
when you use dispatch blocks using GCD you're good, the os creates the threads and the pools but whenever you create a thread yourself you need to setup an NSAutoreleasePool
under ARC with @autoreleasepool, before that with [[NSAutoreleasePool alloc] init];
Upvotes: 1