Reputation: 19469
__NSAutoreleaseNoPool(): Object 0x4c70ec0 of class UISegmentedControl autoreleased with no pool in place - just leaking
__NSAutoreleaseNoPool(): Object 0x4c70ec0 of class UISegmentedControl autoreleased with no pool in place - just leaking
__NSAutoreleaseNoPool(): Object 0x4c70ec0 of class UISegmentedControl autoreleased with no pool in place - just leaking
__NSAutoreleaseNoPool(): Object 0x4c70ec0 of class UISegmentedControl autoreleased with no pool in place - just leaking
__NSAutoreleaseNoPool(): Object 0x4c70ec0 of class UISegmentedControl autoreleased with no pool in place - just leaking
This is what I get as warning in console. Though it doesnt create a crash but seems to be some memory management issue.
What could be wrong?
I have not autoreleased my segemented control.
Upvotes: 0
Views: 620
Reputation: 1439
This problem commonly arise when you are using multi-threading. If you using threading, should create autorelease pool for that thread
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; //Code.... [pool release];
Upvotes: 7
Reputation: 13999
If you are using UISegmentedControl in a thread that is not main thread as @Martin said, it is not safe.
UIKit Framework Reference - Introduction
Note: For the most part, UIKit classes should be used only from an application’s main thread. This is particularly true for classes derived from UIResponder or that involve manipulating your application’s user interface in any way.
Upvotes: 0