Skip to content
Snippets Groups Projects
Commit 75b0ce7d authored by jsiegle's avatar jsiegle
Browse files

Switch pointers to ScopedPointers in MainWindow

MainWindow now points to the ProcessorGraph and AudioComponent
with ScopedPointers. deleteAndZero must no longer be called
in the destructor.
parent 34ccc510
Branches
Tags
No related merge requests found
......@@ -74,25 +74,19 @@ MainWindow::~MainWindow()
if (audioComponent->callbacksAreActive()) {
audioComponent->endCallbacks();
processorGraph->disableProcessors();
}
}
saveWindowBounds();
// processorGraph->saveState();
audioComponent->disconnectProcessorGraph();
UIComponent* ui = (UIComponent*) getContentComponent();
ui->disableDataViewport();
deleteAndZero(processorGraph);
deleteAndZero(audioComponent);
setMenuBar(0);
#if JUCE_MAC
MenuBarModel::setMacMainMenu (0);
#endif
// setContentComponent (0);
#endif
}
......
......@@ -73,10 +73,10 @@ private:
void loadWindowBounds();
/** A pointer to the application's AudioComponent (owned by the MainWindow). */
AudioComponent* audioComponent;
ScopedPointer<AudioComponent> audioComponent;
/** A pointer to the application's ProcessorGraph (owned by the MainWindow). */
ProcessorGraph* processorGraph;
ScopedPointer<ProcessorGraph> processorGraph;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment