mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
Patch by Chris Wilson to fix memory leak in NearestZeroCrossing(). I found another one in the same function and modified this patch to fix that as well.
This commit is contained in:
parent
71dedc3d35
commit
8105988e25
@ -2587,6 +2587,7 @@ double AudacityProject::NearestZeroCrossing(double t0)
|
||||
dist[i] += 0.1 * (abs(i - windowSize/2)) / float(windowSize/2);
|
||||
}
|
||||
|
||||
delete [] oneDist;
|
||||
track = iter.Next();
|
||||
}
|
||||
|
||||
@ -2600,6 +2601,8 @@ double AudacityProject::NearestZeroCrossing(double t0)
|
||||
}
|
||||
}
|
||||
|
||||
delete [] dist;
|
||||
|
||||
return t0 + (argmin - windowSize/2)/GetRate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user