Skip to content

Commit

Permalink
Fix resource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kbinani committed Aug 9, 2024
1 parent e060a1e commit 233868b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions screenshot_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static CGImageRef capture(CGDirectDisplayID id, CGRect diIntersectDisplayLocal,
}
}];
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
dispatch_release(semaphore);
return result;
#else
CGImageRef img = CGDisplayCreateImageForRect(id, diIntersectDisplayLocal);
Expand Down

0 comments on commit 233868b

Please sign in to comment.