[Kst] branches/work/kst/portto4/kst/src

Barth Netterfield netterfield at astro.utoronto.ca
Sun Jan 16 01:01:24 CET 2011


SVN commit 1214709 by netterfield:

BUG: 256401
Delete data manager when doc is deleted.



 M  +4 -0      libkstapp/mainwindow.cpp  
 M  +1 -0      libkstmath/histogram.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #1214708:1214709
@@ -241,6 +241,8 @@
   }
 
   if (clearApproved) {
+    delete _dataManager;
+    _dataManager = 0;
     delete _doc;
     _doc = new Document(this);
   } else {
@@ -296,6 +298,8 @@
 
 void MainWindow::openFile(const QString &file) {
   QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+  delete _dataManager;
+  _dataManager = 0;
   delete _doc;
   _doc = new Document(this);
 
--- branches/work/kst/portto4/kst/src/libkstmath/histogram.cpp #1214708:1214709
@@ -47,6 +47,7 @@
   // _Bins, _bVector and _hVector need to be valid, 
   // so initialize them as size 2 (where 2 is a small valid number)
   _Bins = new unsigned long[2];
+  _NumberOfBins = 0;
 
   VectorPtr v = store->createObject<Vector>();
   v->setProvider(this);


More information about the Kst mailing list