From fccf06c28858d0e38186cb53614ad6d59a1c9907 Mon Sep 17 00:00:00 2001 From: Josh Siegle <jsiegle@mit.edu> Date: Wed, 22 Jan 2014 21:02:16 -0500 Subject: [PATCH] Remove extra 'systemRequestedQuit' from MainWindow code --- Source/Audio/AudioComponent.cpp | 2 -- Source/Audio/AudioComponent.h | 2 +- Source/MainWindow.cpp | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/Audio/AudioComponent.cpp b/Source/Audio/AudioComponent.cpp index c61dac3f5..7d4017a25 100644 --- a/Source/Audio/AudioComponent.cpp +++ b/Source/Audio/AudioComponent.cpp @@ -117,8 +117,6 @@ AudioComponent::~AudioComponent() if (callbacksAreActive()) endCallbacks(); - deleteAndZero(graphPlayer); - } void AudioComponent::setBufferSize(int s) diff --git a/Source/Audio/AudioComponent.h b/Source/Audio/AudioComponent.h index 1fbff16ec..8abd78cc4 100644 --- a/Source/Audio/AudioComponent.h +++ b/Source/Audio/AudioComponent.h @@ -91,7 +91,7 @@ private: bool isPlaying; - AudioProcessorPlayer* graphPlayer; + ScopedPointer<AudioProcessorPlayer> graphPlayer; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AudioComponent); diff --git a/Source/MainWindow.cpp b/Source/MainWindow.cpp index fb6729bd3..232ca741d 100644 --- a/Source/MainWindow.cpp +++ b/Source/MainWindow.cpp @@ -105,7 +105,6 @@ void MainWindow::saveWindowBounds() std::cout << "Saving window bounds." << std::endl; - //File file = File::getCurrentWorkingDirectory().getChildFile("windowState.xml"); File executable = File::getSpecialLocation(File::currentExecutableFile); File executableDirectory = executable.getParentDirectory(); @@ -115,8 +114,6 @@ void MainWindow::saveWindowBounds() xml->setAttribute("version", JUCEApplication::getInstance()->getApplicationVersion()); - JUCEApplication::getInstance()->systemRequestedQuit(); - XmlElement* bounds = new XmlElement("BOUNDS"); bounds->setAttribute("x",getScreenX()); bounds->setAttribute("y",getScreenY()); -- GitLab