Dawson Written | 23 Aug 06:07

Memory Leaks on Effect Preview in src/effects/Effects.cpp

This may already be a known issue, but I noticed that 
Effect::ReplaceProcessedWaveTracks properly removes and deletes 
mWaveTracks entries on performing any of the actual effects, but not on 
the preview-generated effects when pressing the dialog's Preview button.

Each time a preview is executed, (pTrack == pInWaveTrack) always 
evaluate to false inside the do while loop, and never deletes each 
pInWaveTrack (mWaveTracks entries) before it deletes mWaveTracks itself, 
therefore leaking the memory.

It appears performing actual effect has mWaveTracks entries in mTracks 
so when pTrack does equal pInWaveTrack, mWaveTracks entries are deleted, 
but for previews there are none in mTracks.

I don't know how to fix this (modify the code to delete them in that 
part of the code or add mWaveTracks entries into mTracks for 
preview-generated effects, etc.), either way it looks way too 
complicated for me now.  I'll leave it up to your more capable hands.

Just thought I'd let you know.

Thanks,
  Dawson

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)

Vaughan Johnson | 25 Aug 23:16
Favicon

Re: Memory Leaks on Effect Preview in src/effects/Effects.cpp

Thanks for the report, Dawson. We'll look into it.

- Vaughan

Dawson Written wrote:
> This may already be a known issue, but I noticed that 
> Effect::ReplaceProcessedWaveTracks properly removes and deletes 
> mWaveTracks entries on performing any of the actual effects, but not on 
> the preview-generated effects when pressing the dialog's Preview button.
>
> Each time a preview is executed, (pTrack == pInWaveTrack) always 
> evaluate to false inside the do while loop, and never deletes each 
> pInWaveTrack (mWaveTracks entries) before it deletes mWaveTracks itself, 
> therefore leaking the memory.
>
> It appears performing actual effect has mWaveTracks entries in mTracks 
> so when pTrack does equal pInWaveTrack, mWaveTracks entries are deleted, 
> but for previews there are none in mTracks.
>
> I don't know how to fix this (modify the code to delete them in that 
> part of the code or add mWaveTracks entries into mTracks for 
> preview-generated effects, etc.), either way it looks way too 
> complicated for me now.  I'll leave it up to your more capable hands.
>
>
> Just thought I'd let you know.
>
> Thanks,
>   Dawson
>
(Continue reading)


Gmane