From ad0055be5bdd6dd7ecf4858fdbe47e5dc3bc2c5d Mon Sep 17 00:00:00 2001 From: soundflix <80773469+soundflix@users.noreply.github.com> Date: Sun, 5 Mar 2023 22:16:58 +0100 Subject: [PATCH] fixed deallocate method --- ZMAX/Sources/Extensions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)