Fix while -> if bug introduced when refactoring ARC code which caused infinite

loop.

Reported by Tom Davie.
main
theraven 13 years ago
parent abc1d44c9c
commit 3649fe37ec

@ -134,13 +134,12 @@ static void emptyPool(struct arc_tls *tls, id *stop)
static void cleanupPools(struct arc_tls* tls) static void cleanupPools(struct arc_tls* tls)
{ {
struct arc_autorelease_pool *pool = tls->pool;
if (tls->returnRetained) if (tls->returnRetained)
{ {
release(tls->returnRetained); release(tls->returnRetained);
tls->returnRetained = nil; tls->returnRetained = nil;
} }
while(NULL != pool) if (NULL != tls->pool)
{ {
emptyPool(tls, NULL); emptyPool(tls, NULL);
assert(NULL == tls->pool); assert(NULL == tls->pool);

Loading…
Cancel
Save