Remove the unused legacy code for weak retain

This commit is contained in:
DreamPiggy 2023-11-29 17:37:29 +08:00
parent 112c74c1b9
commit 40b3d7f438
1 changed files with 3 additions and 3 deletions

View File

@ -272,10 +272,10 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
return kCVReturnSuccess;
}
CVTimeStamp outputTime = inOutputTime ? *inOutputTime : *inNow;
__weak SDDisplayLink *weakObject = object;
// `SDWeakProxy` is weak, so it's safe to dispatch to main queue without leak
dispatch_async(dispatch_get_main_queue(), ^{
weakObject.outputTime = outputTime;
[weakObject displayLinkDidRefresh:(__bridge id)(displayLink)];
object.outputTime = outputTime;
[object displayLinkDidRefresh:(__bridge id)(displayLink)];
});
return kCVReturnSuccess;
}