Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 22e117f

Browse files
committed
Don't use __block storage
Using __block with non copyable objects should not have compiled, but yet it did for unique PTR for some reason. But just in case use shared_ptr instead.
1 parent 40d1453 commit 22e117f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell/platform/darwin/macos/framework/Source/FlutterDisplayLinkTest.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ - (void)onDisplayLink:(CFTimeInterval)timestamp targetTimestamp:(CFTimeInterval)
154154
CVDisplayLinkRef link;
155155
CVDisplayLinkCreateWithCGDisplay(CGMainDisplayID(), &link);
156156
__block CFTimeInterval last = 0;
157-
__block auto intervals = std::make_unique<std::vector<CFTimeInterval>>();
158-
__block auto event = std::make_unique<fml::AutoResetWaitableEvent>();
157+
auto intervals = std::make_shared<std::vector<CFTimeInterval>>();
158+
auto event = std::make_shared<fml::AutoResetWaitableEvent>();
159159
CVDisplayLinkSetOutputHandler(
160160
link, ^(CVDisplayLinkRef displayLink, const CVTimeStamp* inNow,
161161
const CVTimeStamp* inOutputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut) {

0 commit comments

Comments
 (0)