[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Oct 21 19:35:08 CEST 2004


CVS commit by staikos: 

cleanup some memory leaks


  M +3 -0      enodes.cpp   1.21
  M +4 -0      kstplugin.cpp   1.70


--- kdeextragear-2/kst/kst/enodes.cpp  #1.20:1.21
@@ -304,4 +304,7 @@ Function::~Function() {
   delete[] _inVectors;
   delete[] _outScalars;
+  for (int i = 0; i < _outputVectorCnt; ++i) {
+    delete[] _outVectors[i];
+  }
   delete[] _outVectors;
   delete[] _inArrayLens;

--- kdeextragear-2/kst/kst/kstplugin.cpp  #1.69:1.70
@@ -127,4 +127,8 @@ void KstPlugin::commonConstructor() {
 
 KstPlugin::~KstPlugin() {
+  if (_localData) {
+    free(_localData);
+    _localData = 0L;
+  }
   //kdDebug() << "Destroying KSTPlugin: " << long(this) << endl;
 }





More information about the Kst mailing list