0
votes

I am currently receiving the error :

2000-01-03 06:51:27.-641 mytestapp[470:5c03
] *** __NSAutoreleaseNoPool(): Object 0x15a5a0 
of class __NSArrayM >autoreleased with no pool in place - just leaking

From investigation of the other stackoverflow links, this problem seems to occur when people do not create an autorelease pool before a thread selector and drain it after.

However, I have attempted to accommodate this and still am stumped. I have the code here on pastebin. If anyone can help it would be greatly appreciated.

Thanks

2

2 Answers

1
votes

"create an autorelease pool before a thread selector and drain it after" What? where have you heard this?

You must have understood it wrong. You don't put an autorelease pool on the original thread -- that's useless. You are supposed to put it in the new thread, just around all the code that will execute in the thread. In your case, that means inside the block -- create it at the beginning of the body of the block, and drain it at the end of the body of the block.

0
votes

You need an autoreleasepool in place in the main.m, else any object that attempts to recieve the autorelease message will "just leak" with no pool in place. Unfortunately, that mutable array is probably a framework object, so your pool would do nothing to fix it.