diff options
author | Tom Rondeau | 2011-04-06 00:05:05 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-04-06 00:05:05 -0400 |
commit | 484b6a0715f2ed6e4f460ee05887e1e5c98c1e2f (patch) | |
tree | 3e6e91015693921a63dbd3be75db5bcfbffd160c /gr-qtgui/lib | |
parent | c5fd71cf8e03617a902291e85c589f3ff37e3fd8 (diff) | |
download | gnuradio-484b6a0715f2ed6e4f460ee05887e1e5c98c1e2f.tar.gz gnuradio-484b6a0715f2ed6e4f460ee05887e1e5c98c1e2f.tar.bz2 gnuradio-484b6a0715f2ed6e4f460ee05887e1e5c98c1e2f.zip |
gr-qtgui: don't delete the SpectrumDisplayWindow; as a QWidget, it takes care of itself when the parent is deleted.
Diffstat (limited to 'gr-qtgui/lib')
-rw-r--r-- | gr-qtgui/lib/SpectrumGUIClass.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc index c62f34290..3342c0cb3 100644 --- a/gr-qtgui/lib/SpectrumGUIClass.cc +++ b/gr-qtgui/lib/SpectrumGUIClass.cc @@ -42,10 +42,12 @@ SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize, SpectrumGUIClass::~SpectrumGUIClass() { - if(GetWindowOpenFlag()){ - printf("spectrumDisplayForm: %p\n", _spectrumDisplayForm); - delete _spectrumDisplayForm; - } + // We don't need to delete this since as a QWidget, it is supposed to be destroyed + // with it's parent. Deleting it causes a segmentation fault, and not deleting it + // does not leave any extra memory. + //if(GetWindowOpenFlag()){ + //delete _spectrumDisplayForm; + //} if(_fftBuffersCreatedFlag){ delete[] _fftPoints; @@ -78,7 +80,6 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent, // Called from the Event Thread _spectrumDisplayForm = new SpectrumDisplayForm(use_openGL, parent); - printf("spectrumDisplayForm: %p\n", _spectrumDisplayForm); // Toggle Windows on/off _spectrumDisplayForm->ToggleTabFrequency(frequency); @@ -101,8 +102,6 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent, qApp->postEvent(_spectrumDisplayForm, new QEvent(QEvent::Type(QEvent::User+3))); - //qApp->processEvents(); - timespec_reset(&_lastGUIUpdateTime); // Draw Blank Display |