JuceDemo memory leak assertions


#1

If I run JuceDemo and in the Widgets demo (misc widgets) drag the box as invited onto the desktop, then quit, this triggers a slew of memory leak assertions, starting from Desktop::~Desktop() in juce_Desktop.cpp. (Compiled on Ubuntu though I doubt this is the issue.)

Since there is only one (static) Desktop, why not just remove all its contents in the destructor? When would this be the wrong behaviour?

Another place to do this would be in JUCEDemoApplication::shutdown() which would fix this app without changing global behaviour.

Has anyone else run into this and if so how fixed? I couldn’t find the issue on a quick search of the forums.


#2

Ah, that’s just my sloppy programming in that old demo page. The component that gets dragged onto the desktop is leaked, I think. Nothing to worry about!