Hello,
My main window is
class MainComponent : public AudioAppComponent, public Slider::Listener, public ComboBox::Listener, public TextButton::Listener, public TextEditor::Listener
I created another DocumentWindow as a Dialog Window inside that MainComponent
DocumentWindow* combowindow = new DocumentWindow(“ComboWindow”, Colour::Colours::white, DocumentWindow::allButtons, false)
Also I created a component
Component combocontent;
I inserted several buttons, text editors etc inside that combocontent
And
combowindow->setContentOwned(&combocontent, false);
So I use this combowindow as a dialog popup window
But, when I exit this program
delete combowindow;
This causes crashes
So I tried
combocontent.removeAllChildren();
combowindow->clearContentComponent();
It does not work. The program crashes
+++++++++++++++++===================================**************************
More precisely it crashes here
void ResizableWindow::clearContentComponent()
{
if (ownsContentComponent)
{
contentComponent.deleteAndZero();
}
else
{
removeChildComponent (contentComponent);
contentComponent = nullptr;
}
}
+++++++++++++++++===================================**************************
So, could you please teach me how to handle this properly
Thank you