|
|
|
@ -855,7 +855,8 @@ OBJC_PUBLIC id objc_loadWeakRetained(id* addr)
|
|
|
|
// will acquire the lock before attempting to deallocate)
|
|
|
|
// will acquire the lock before attempting to deallocate)
|
|
|
|
if (obj == nil)
|
|
|
|
if (obj == nil)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// If we've destroyed this weak ref, then make sure that we also deallocate the object.
|
|
|
|
// If the object is destroyed, drop this reference to the WeakRef
|
|
|
|
|
|
|
|
// struct.
|
|
|
|
if (ref != NULL)
|
|
|
|
if (ref != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
weakRefRelease(ref);
|
|
|
|
weakRefRelease(ref);
|
|
|
|
|