Skip to content

Commit

Permalink
Use withExtendedLifetime instead of a dummy access
Browse files Browse the repository at this point in the history
The compiler in theory has the latitude to optimize this out otherwise.
  • Loading branch information
saagarjha committed Feb 24, 2024
1 parent 786bc41 commit febe9eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macOS/WindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ extension AXObserver {
// Retain the observer until the stream is finished
let _observer = observer
continuation.onTermination = { _ in
_ = _observer
withExtendedLifetime(_observer) {}
}
}
}
Expand Down

0 comments on commit febe9eb

Please sign in to comment.