Fix case where more than 4 weak references to the same object would cause infinite loops.

Patch by Thomas Davie!
This commit is contained in:
theraven 2012-06-18 16:01:40 +00:00
parent f059be5337
commit 8e023f0063

2
arc.m
View File

@ -519,6 +519,7 @@ id objc_storeWeak(id *addr, id obj)
break;
}
}
oldRef = oldRef->next;
}
}
if (nil == obj)
@ -569,6 +570,7 @@ id objc_storeWeak(id *addr, id obj)
{
break;
}
ref = ref->next;
}
if (NULL != ref)
{