Hi,
I am a total beginner to Juce, but because of its apparent strength with regards to audio processing, I wanted to try it out for some ham radio applications that I am playing with. I have my hello world up and running, that plays sound that I have generated.
But on shutdown I am struggeling with this error:
'SoftRockCw.exe': Unloaded 'C:\Windows\SysWOW64\shdocvw.dll'
*** Leaked objects detected: 1 instance(s) of class SimpleDeviceManagerInputLevelMeter
JUCE Assertion failure in juce_leakedobjectdetector.h:95
SoftRockCw.exe has triggered a breakpoint
What my program does in startup is (Please forgive my break with coding standards, I work in a hardcore K&R environment, and habits like that are difficult to break with) :
mDevManager = new AudioDeviceManager();
mDevManager->initialise(0,2,NULL,true);
mSelector = new AudioDeviceSelectorComponent(*mDevManager,0,2,2,2,false,false,true,true);
mDevManager->addAudioCallback(static_cast<juce::AudioIODeviceCallback*>(&mCallback));
The UI is a single window with various tabs for control, and I add the mSelector to a new (static) tab as follows:
tabbedComponent->addTab(tabName,tabBackgroundColour,contentComponent,false);
The leak / assert happens when I shut down the program (press red button with mouse) - Using the debugger I see that SimpleDeviceManagerInputLevelMeter is created, deleted, then created again, but never deleted before the leak check. If I try to delete delete the selector myself, I run into a double free - which is even worse
I am suspecting that the audio selector was not intended to be a permanent fixture of the UI , and there could be a problem when tearing down the app when audio devices and the selector components are active. Either that or I have done some other silly beginners mistake. Any help or hints will be much appreciated. Oh an my Juce version is master from 09/05/2013.