Skip to content

Commit 697a552

Browse files
committed
2 parents 5498ed4 + 58975dd commit 697a552

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/SoundpipeAudioKit/Generators/PhaseLockedVocoder.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,11 @@ public class PhaseLockedVocoder: Node {
160160
au.setWavetable(data: data, size: Int(ioNumberFrames))
161161
} else {
162162
// failure
163-
theData?.deallocate()
164-
theData = nil // make sure to return NULL
165163
Log("Error = \(err)"); break Exit
166164
}
165+
// Fixing a previous memory leak
166+
theData?.deallocate()
167+
theData = nil
167168
}
168169
}
169170
}

0 commit comments

Comments
 (0)