Remove accidentally-committed WIP ARC code.

main
theraven 15 years ago
parent b633338a7a
commit 065531b12e

52
arc.m

@ -80,55 +80,3 @@ id objc_storeStrong(id *object, id value)
[oldValue release];
return value;
}
////////////////////////////////////////////////////////////////////////////////
// Weak references
////////////////////////////////////////////////////////////////////////////////
//
//FIXME: These are all stubs!
struct
{
id *ref[4];
struct weakRef *next;
} weakRef;
id objc_storeWeak(id *addr, id obj)
{
id old = *addr;
if (
return obj;
}
id objc_loadWeakRetained(id* obj)
{
}
id objc_loadWeak(id* object)
{
return objc_autorelease(objc_loadWeakRetained(object));
}
void objc_copyWeak(id *dest, id *src)
{
objc_release(objc_initWeak(dest, objc_loadWeakRetained(src)));
}
void objc_moveWeak(id *dest, id *src)
{
// FIXME: src can be zero'd here, removing the relationship between the
// object and the pointer, which can be cheaper.
objc_moveWeak(dest, src);
}
void objc_destroyWeak(id* obj)
{
objc_storeWeak(object, nil);
}
id objc_initWeak(id *object, id value)
{
*object = nil;
return objc_storeWeak(object, value);
}

Loading…
Cancel
Save