Skip to content

Commit ced6124

Browse files
committed
Free alphas_a array
1 parent 30ed519 commit ced6124

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libtorchaudio/forced_align/cpu/compute.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ void forced_align_impl(
119119
}
120120
auto idx1 = (T - 1) % 2;
121121
auto ltrIdx = alphas_a[S - 1][idx1] > alphas_a[S - 2][idx1] ? S - 1 : S - 2;
122+
delete[] alphas_a;
122123
// path stores the token index for each time step after force alignment.
123124
for (auto t = T - 1; t > -1; t--) {
124125
auto lbl_idx = ltrIdx % 2 == 0 ? blank : targets_a[batchIndex][ltrIdx / 2];

0 commit comments

Comments
 (0)