Skip to content

Commit 90a131b

Browse files
committed
Fixing a memory leak from not deallocating audio data pointer
1 parent f6b536d commit 90a131b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Sources/SoundpipeAudioKit/Generators/PhaseLockedVocoder.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ public class PhaseLockedVocoder: Node {
158158
bufferList.mBuffers.mData?.assumingMemoryBound(to: Float.self)
159159
)
160160
au.setWavetable(data: data, size: Int(ioNumberFrames))
161+
// Fixing a previous memory leak
162+
theData?.deallocate()
163+
theData = nil
161164
} else {
162165
// failure
163166
theData?.deallocate()

0 commit comments

Comments
 (0)