I’m probably overthinking this.
// Inside some method...
NSThread *thread = [[NSThread alloc] initWithTarget:functionWrapper selector:@selector(run) object:nil];
[thread start];
Calling [thread release] after this: A. Avoids a memory leak and is necessary or… B. Will break things.
The answer to this question suggests that the thread will release itself when it finished executing, but where is that behavior documented?
Yes you will have to release it some time later, either through autorelease or release.
However, you don’t really need to init your own thread in the first place, objective-c has plenty of ways for you to implement threading without allocing a new thread yourself, like
There are also NSOperations that allow you to queue up your tasks as well.