SideTable& table = SideTables()[this];
size_t& refcntStorage = table.refcnts[this];
refcntStorage += SIDE_TABLE_RC_ONE;
複製代碼
SideTable& table = SideTables()[this];
RefcountMap::iterator it = table.refcnts.find(this);
it->second -= SIDE_TABLE_RC_ONE;
複製代碼
SideTable& table = SideTables()[this];
size_t refcnt_result = 1;
RefcountMap::iterator it = table.refcnts.find(this);
refcnt_result += it->second >> SIDE_TABLE_RC_SHIFT;
複製代碼
5.dealloc 數據結構
object_dispose() objc_destructInstance() clearDeallocating(){
id __weak obj1 = obj;
}
{
id obj1;
objc_initWeak(&obj1, obj);
}
複製代碼
void *ctx = objc_autoreleasePoolPush();
...
objc_autoreleasePoolPop(ctx);
複製代碼
void *objc_autoreleasePoolPush(void) <=> void *AutoreleasePoolPage::push(void)
void objc_autoreleasePoolPop(void* ctx) <=> AutoreleasePoolPage::pop(void* ctx)
複製代碼