Skip to content

Commit 35a6fcc

Browse files
authored
Merge branch 'main' into timestamp
2 parents 0f200fb + 57edefe commit 35a6fcc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/FluidAudio/Shared/ANEMemoryUtils.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Accelerate
22
import CoreML
3+
import Darwin
34
import Foundation
45
import Metal
56

@@ -66,7 +67,8 @@ public enum ANEMemoryUtils {
6667
dataType: dataType,
6768
strides: strides,
6869
deallocator: { bytes in
69-
bytes.deallocate()
70+
// `posix_memalign` requires `free` for cleanup; `deallocate()` would trap.
71+
Darwin.free(bytes)
7072
}
7173
)
7274

0 commit comments

Comments
 (0)