Skip to content

Commit 1c85998

Browse files
committed
no free garbage collection outside Swift
1 parent 4ad65ba commit 1c85998

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/SwiftAA/JulianDay.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ public extension JulianDay {
9191
/// This intermediate use of the Gregorian calendar in general instead of Julian Day is risky and most likely slow, but changing would require a lot of work.
9292
var year: Int {
9393
let aaDate = KPCAADate_CreateWithJulianDay(value, true)
94-
return KPCAADate_GetYear(aaDate)
94+
let aaYear = KPCAADate_GetYear(aaDate)
95+
KPCAADate_Destroy(aaDate)
96+
return aaYear
9597
}
9698

9799
/// Returns the so-called Modified Julian Day corresponding to the Julian Day value.

0 commit comments

Comments
 (0)