mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 08:14:19 +09:00
feat: fix memory leak in the apple silicon sensors reader (#417)
This commit is contained in:
@@ -180,7 +180,7 @@ internal class AppleSilicon_SensorsReader: SensorsReader {
|
||||
let namePtr: Unmanaged<CFString>? = IOHIDServiceClientCopyProperty(service.pointee, "Product" as CFString)
|
||||
let eventPtr: IOHIDEventRef? = IOHIDServiceClientCopyEvent(service.pointee, Int64(eventType), 0, 0)
|
||||
|
||||
guard let name = namePtr?.takeUnretainedValue() else {
|
||||
guard let name = namePtr?.takeRetainedValue() else {
|
||||
return
|
||||
}
|
||||
var value: Double? = nil
|
||||
|
||||
Reference in New Issue
Block a user