summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2011-04-06 00:05:05 -0400
committerTom Rondeau2011-04-06 00:05:05 -0400
commit484b6a0715f2ed6e4f460ee05887e1e5c98c1e2f (patch)
tree3e6e91015693921a63dbd3be75db5bcfbffd160c
parentc5fd71cf8e03617a902291e85c589f3ff37e3fd8 (diff)
downloadgnuradio-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.
-rw-r--r--gr-qtgui/lib/SpectrumGUIClass.cc13
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