NSAutoreleasePool, as the document says, “if you detach a thread — you need to create your own autorelease pool.” Previously,I thought when detach a thread, it maybe cause memory leaks, but when I was testing, there was no leaks. So how to explain The document? Does it still need a autorelease pool? Can you help me? Thanks very much!
Asked
Active
Viewed 120 times
0
-
in the new thread, I add the autoreleased object, eg: `People *p = [People peopleWithName:@"test"];` – Lion.Liu Dec 27 '16 at 09:52
-
Possible duplicate of [does NSThread create autoreleasepool automatically now?](https://stackoverflow.com/questions/24952549/does-nsthread-create-autoreleasepool-automatically-now) – newacct May 31 '17 at 17:23