changeset 2011:74925c1746dd

more free/delete
author corvid <corvid@lavabit.com>
date Fri, 13 May 2011 00:51:50 +0000
parents c60462acb9cf
children a1527f16dc76
files dw/findtext.cc dw/layout.cc lout/misc.cc
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/dw/findtext.cc	Thu May 12 07:56:42 2011 -0400
+++ b/dw/findtext.cc	Fri May 13 00:51:50 2011 +0000
@@ -37,7 +37,7 @@
 FindtextState::~FindtextState ()
 {
    if (key)
-      delete key;
+      free(key);
    if (nexttab)
       delete[] nexttab;
    if (iterator)
@@ -52,7 +52,7 @@
 
    // A widget change will restart the search.
    if (key)
-      delete key;
+      free(key);
    key = NULL;
    if (nexttab)
       delete[] nexttab;
@@ -81,7 +81,7 @@
        strcmp (this->key, key) != 0) {
       newKey = true;
       if (this->key)
-         delete this->key;
+         free(this->key);
       this->key = strdup (key);
       this->caseSens = caseSens;
 
@@ -147,7 +147,7 @@
    unhighlight ();
 
    if (key)
-      delete key;
+      free(key);
    key = NULL;
 }
 
--- a/dw/layout.cc	Thu May 12 07:56:42 2011 -0400
+++ b/dw/layout.cc	Fri May 13 00:51:50 2011 +0000
@@ -534,7 +534,7 @@
    _MSG("setAnchor (%s)\n", anchor);
 
    if (requestedAnchor)
-      delete requestedAnchor;
+      free(requestedAnchor);
    requestedAnchor = anchor ? strdup (anchor) : NULL;
    updateAnchor ();
 }
--- a/lout/misc.cc	Thu May 12 07:56:42 2011 -0400
+++ b/lout/misc.cc	Fri May 13 00:51:50 2011 +0000
@@ -144,7 +144,7 @@
    Node *node, *nextNode;
    for (node = firstNode; node; node = nextNode) {
       nextNode = node->next;
-      delete node->data;
+      free(node->data);
       delete node;
    }
    firstNode = lastNode = NULL;