[Kst] kst_1_0_branch: kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Dec 6 04:07:59 CET 2004


CVS commit by staikos: 

backport leak fix from HEAD


  M +6 -0      enodefactory.cpp   1.6.2.1
  M +3 -0      enodefactory.h   1.6.2.1
  M +2 -0      enodes.cpp   1.31.2.2


--- kdeextragear-2/kst/kst/enodefactory.cpp  #1.6:1.6.2.1
@@ -85,4 +85,10 @@ void *NewNot(void *n) {
 }
 
+
+void DeleteNode(void *n) {
+  delete static_cast<Node*>(n);
+}
+
+
 }
 

--- kdeextragear-2/kst/kst/enodefactory.h  #1.6:1.6.2.1
@@ -51,4 +51,7 @@ extern "C" {
   void AppendArgument(void *list, void *arg);
 
+  void DeleteNode(void *n); /* WARNING: this does evil things.  will cause a
+                               crash if we ever do MI in the tree */
+
 #ifdef __cplusplus
 }

--- kdeextragear-2/kst/kst/enodes.cpp  #1.31.2.1:1.31.2.2
@@ -669,4 +669,6 @@ LogicalNot::LogicalNot(Node *node)
 
 LogicalNot::~LogicalNot() {
+  delete _n;
+  _n = 0L;
 }
 





More information about the Kst mailing list