¡@

Home 

2014/10/15 ¤U¤È 10:12:56

iphone Programming Glossary: processcondition

when is it safe to release an NSThread?

http://stackoverflow.com/questions/1151637/when-is-it-safe-to-release-an-nsthread

NSThread processThread To close the thread I call cancel secondary thread processThread cancel signal condition processCondition broadcast Is it then safe to then call processCondition release processThread release or do i need to be sure that the thread.. cancel secondary thread processThread cancel signal condition processCondition broadcast Is it then safe to then call processCondition release processThread release or do i need to be sure that the thread has finished Perhaps like this NSTimeInterval timeout.. while processThread isExecuting NSDate timeIntervalSinceReferenceDate timeout NSThread sleepForTimeInterval 1.0 1000.0 processCondition release processThread release detailed code and explanation void processLoop NSAutoreleasePool outerPool NSAutoreleasePool..