diff --git a/ZMAX/Sources/Extensions.swift b/ZMAX/Sources/Extensions.swift index 2003829..6051d7b 100644 --- a/ZMAX/Sources/Extensions.swift +++ b/ZMAX/Sources/Extensions.swift @@ -211,7 +211,7 @@ extension AXValue { public func toValue() -> T? { let pointer = UnsafeMutablePointer.allocate(capacity: 1) defer { - pointer.deallocate(capacity: 1) + pointer.deallocate() } let success = AXValueGetValue(self, AXValueGetType(self), pointer) return success ? pointer.pointee : nil @@ -220,7 +220,7 @@ extension AXValue { public static func from(value: T, type: AXValueType) -> AXValue? { let pointer = UnsafeMutablePointer.allocate(capacity: 1) defer { - pointer.deallocate(capacity: 1) + pointer.deallocate() } pointer.pointee = value return AXValueCreate(type, pointer)