AudioTumbnail memory issue


When opening an audio file for playback in the JuceDemo, memory usage is starting to peak ( I stopped monitoring after it reached 1GB).
I tired both WAV and MP3 files and it happens to both (Windows machine).

I believe it’s related to the GUI rendering ( thumbnail->setFile (audioFile); )

I still don’t know why but it’s related to drawing the position line, if you take off this line in the timerCallback:

        currentPositionMarker.setRectangle (Rectangle<float> (timeToX (currentPlayPosition) - 0.75f, 0,
                                                              1.5f, (float) getHeight()));

Then It stop leaking.

Hmm… I can’t really see how that could leak. Aren’t you getting some leak warnings on shutdown?

No, that’s a small mystery…

Well if there’s no warnings, then there’s no leak. The thumbnail will temporarily allocate blocks of memory, which the runtime and OS may not reclaim immediately. The memory usage figures that the task manager shows you are practically useless for debugging, you know?

I guess you are right, I just don’t understand why this is the only place where this memory explosion is happening in the usage display, I’m also worried about the users’ reaction.

Thanks Jules

Well, if you can give me something more concrete to look at then I will do, but task manager numbers don’t count as admissible evidence in my courtroom.