We still have to delete the Clip's, or else we would just be eating
up memory. But we should first make sure that the Track's no longer
see this Clip in their m_clips vector. This has to happen
as it's own operation because we have to wait for the audio thread(s)
first. This would ensure that Track's do not create
PlayHandle's that would refer to a Clip that is currently
being destroyed. After that, then we call deleteLater on the Clip.
This commit is contained in:
sakertooth
2023-09-27 08:10:44 -04:00
parent 7c8804bfcc
commit 8689a68ad5

View File

@@ -295,11 +295,9 @@ void ClipView::remove()
// delete ourself
close();
// Since the Track would own the clip, we don't delete it
if (m_clip->getTrack())
{
m_clip->getTrack()->removeClip(m_clip);
return;
}
m_clip->deleteLater();