Leaked objects in audio plugins

Hi Jules,

I can reproduce leaking objects with the juce demo plugin as well as with a Jucer built new audio plugin. Juce is the current tip, OS is Win7 64 bit and I use Visual Studio 2008 (Express). The build is 32 bit.
This should be related with the AudioProcessorEditor; it doesn’t occour if I don’t return a custom editor (return 0 in creatEditor() and return false in hasEditor).

I also get a C4373 warning about DerivedAudioProcessor::getOutputChannelName and DerivedAudioProcessor::getInputChannelName in PluginProcessor.h. The base class uses (int channelIndex) while the Jucer produces (const int channelIndex) as argument list.


Thanks, I hadn’t tested plugins yet since I added the leak detector, I’ll have a go…

I couldn’t reproduce this… What class is it that’s leaking? (It should have printed its name in the output stream) And which host are you using?

The host is VSTPluginAnalyser (which I use normally while debugging), printed messages are:

*** Leaked objects detected: 2 instance(s) of class class juce::CallbackMessage
*** Leaked objects detected: 3 instance(s) of class class juce::Message

This is for the newly generated Plugin, the demo plugin only leaks two Message object insances.
I didn’t test on other hosts, atm I’m on Mac where this doesn’t seem to be a problem.


Ah - don’t worry about those, it’s just a couple of messages that were still sitting in the system’s message queue when juce was unloaded. This has always happened, but you wouldn’t have noticed before I added the leak detector. It’s only a few bytes - you’d have to load and unload your plugin a million times before it would become a significant problem.

Good to know, thanks.