[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Wed Jul 13 19:17:38 CEST 2005
SVN commit 434312 by rchern:
Delete matrices properly
M +4 -0 kstdoc.cpp
M +12 -18 kstmatrix.cpp
--- trunk/extragear/graphics/kst/kst/kstdoc.cpp #434311:434312
@@ -680,6 +680,10 @@
KST::vectorList.lock().writeLock();
KST::vectorList.clear();
KST::vectorList.lock().writeUnlock();
+
+ KST::matrixList.lock().writeLock();
+ KST::matrixList.clear();
+ KST::matrixList.lock().writeUnlock();
KST::scalarList.lock().writeLock();
KST::scalarList.clear();
--- trunk/extragear/graphics/kst/kst/kstmatrix.cpp #434311:434312
@@ -55,24 +55,18 @@
}
KstMatrix::~KstMatrix() {
- //FIXME: this crashes
-
- // // get rid of the stat scalars
-// printf("crash 1\n");
-// KST::scalarList.lock().writeLock();
-// printf("crash 2\n");
-// for (QDictIterator<KstScalar> iter(_statScalars); iter.current(); ++iter) {
-// KST::scalarList.remove(iter.current());
-// iter.current()->_KShared_unref();
-// printf("crash 3\n");
-// }
-// KST::scalarList.lock().writeUnlock();
-// printf("crash 4\n");
-// if (_z) {
-// free(_z);
-// printf("crash 5\n");
-// _z = 0L;
-// }
+ // get rid of the stat scalars
+ KST::scalarList.lock().writeLock();
+ for (QDictIterator<KstScalar> iter(_statScalars); iter.current(); ++iter) {
+ KST::scalarList.remove(iter.current());
+ iter.current()->_KShared_unref();
+ }
+ KST::scalarList.lock().writeUnlock();
+
+ if (_z) {
+ free(_z);
+ _z = 0L;
+ }
}
More information about the Kst
mailing list