NSAutoreleaseNoPool(): NSConcreteMutableData类的对象0x66ad9d0自动释



我正试图在我的项目中执行线程操作。事情正在工作,但我在我的NSLOG上得到了NSAutoreleaseNoPool(): Object 0x66ad9d0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking春。

My Code is.

NSAutoreleasePool *MyPool = [[NSAutoreleasePool alloc] init];
[NSThread detachNewThreadSelector:@selector(insertSyncRec:) toTarget:self withObject:dict];
[MyPool drain]; // [MyPool release]; too

我的日志信息是:

2011-05-03 17:29:51.262 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd5034d0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.262 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd504190 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.263 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd503930 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.264 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd5066a0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.265 MLead[7240:7e13] *** __NSAutoreleaseNoPool(): Object 0xd4180e0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.266 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd507260 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.266 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd506a50 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.269 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd507af0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.271 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd419a20 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.271 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd4061f0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.267 MLead[7240:7e13] *** __NSAutoreleaseNoPool(): Object 0xd418dc0 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.272 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xa3f5650 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.272 MLead[7240:7e13] *** __NSAutoreleaseNoPool(): Object 0xd4185c0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.272 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd5068c0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.281 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd508f70 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.282 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd504b10 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.272 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd41a470 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.283 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd41ba60 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.284 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd418eb0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.284 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd41bc40 of class NSCFString autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.273 MLead[7240:7e13] *** __NSAutoreleaseNoPool(): Object 0xd506db0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.284 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd41b540 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.285 MLead[7240:8513] *** __NSAutoreleaseNoPool(): Object 0xd5086e0 of class __NSCFData autoreleased with no pool in place - just leaking
2011-05-03 17:29:51.286 MLead[7240:8407] *** __NSAutoreleaseNoPool(): Object 0xd507c30 of class __NSCFData autoreleased with no pool in place - just leaking

等等…

我错过了什么…经过大量的谷歌搜索,我只发现创建一个新的池…

Thanks in advance.

不应该在线程本身中创建池吗?

我也有同样的问题,而不是将任务附加到同一个线程中的新线程尝试。[self insertSyncRec:dict];

我修复了这个问题

相关内容

  • 没有找到相关文章

最新更新