Skip to content

Commit 5f7b25a

Browse files
committed
Daealloc error
1 parent d24a931 commit 5f7b25a

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)