Leaking from a modal DialogWindow


#1

Hi and congratulations for this new Drupal Forum/Site (Jules, how many hours have your day?)

Well, I am a little stuck with a leakage ina a (aparently) simple code:


ASIOError AsioDeckLink::controlPanel()
{
    //mainWindow = new MainWindow();
    DialogWindow::LaunchOptions o;
    o.content.setOwned (new ColourSelector());
    o.content->setSize (400, 400);
    o.dialogTitle                   = "Colour Selector Demo";
    o.dialogBackgroundColour        = Colours::grey;
    o.escapeKeyTriggersCloseButton  = true;
    o.useNativeTitleBar             = false;
    o.resizable                     = true;
    o.runModal();
    return ASE_OK;
}

This code belongs to an ASIO driver. When the host (Jucer's Plugin host app), this leakage report appears:


*** Leaked objects detected: 25 instance(s) of class EdgeTable
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
*** Leaked objects detected: 120 instance(s) of class CachedGlyphEdgeTable
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
*** Leaked objects detected: 1 instance(s) of class GlyphCache
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
*** Leaked objects detected: 2 instance(s) of class WindowsDirectWriteTypeface
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
*** Leaked objects detected: 2 instance(s) of class Typeface
JUCE Assertion failure in juce_leakedobjectdetector.h:98
Plugin Host.exe has triggered a breakpoint.
The program '[4796] Plugin Host.exe' has exited with code 0 (0x0).

The code is in the main thread (Not audio related thread at all).  BTW, I have had to use o.runmodal, becasuse the async launcher didn-t get the focus due to the AudioDeviceSelectorComponent object from PluginHost app is modal and do not transfer the focus unless the new DialogWindow wuld be modal.

Thnak you in advance,

Gabriel