NSAutoreleaseNoPool(): Object 0x66ad9d0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
I am trying to perform thread operation in my project. The things are getting worked but I am getting NSAutoreleaseNoPool(): Object 0x66ad9d0 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
pring on my NSLOG.
My Code is..
NSAutoreleasePool *MyPool = [[NSAutoreleasePool alloc] init];
[NSThread detachNewThreadSelector:@selector(insertSyncRec:) toTarget:self withObject:dict];
[MyPool drain]; // [MyPool release]; too
My log message is:
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] *** __NSAutorel开发者_JS百科easeNoPool(): 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
and so on..
What I am missing.. After lot of googling I only found to create a new pool.. but not worked..
Thanks in advance..
Shouldn't the pool be created within the thread itself?
I also had the same problem,instead of attaching the task to a new thread try in the same thread. [self insertSyncRec:dict];
I fixed my problem doing it this
精彩评论