Skip to content

Commit 1baa2ee

Browse files
committed
Add a comment to clarify it's safe to close uatimezone
1 parent bd80d89 commit 1baa2ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/FoundationInternationalization/TimeZone/TimeZone_GMTICU.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ internal final class _TimeZoneGMTICU : _TimeZoneProtocol, @unchecked Sendable {
9191
var status = U_ZERO_ERROR
9292
let tz = uatimezone_open($0.baseAddress, Int32($0.count), &status)
9393
defer {
94+
// `uatimezone_close` checks for nil input, so it's safe to do it even there's an error.
9495
uatimezone_close(tz)
9596
}
9697
guard status.isSuccess else {

0 commit comments

Comments
 (0)