NSAutoreleasepool:iPhone应用程序中的内存管理问题

Par*_*att 0 iphone memory-leaks memory-management nsautoreleasepool ios4

__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
Run Code Online (Sandbox Code Playgroud)

这是我在控制台中收到的警告.虽然它不会造成崩溃,但似乎是一些内存管理问题.

可能有什么不对?

我没有自动释放我的分段控制.

itZ*_*Zme 7

使用多线程时通常会出现此问题.如果使用线程,则应为该线程创建自动释放池

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

//Code....

[pool release];