changeset 2005:b519799e360d

straighten out free/delete/delete[]
author corvid <corvid@lavabit.com>
date Tue, 10 May 2011 21:07:30 +0000
parents dec39f62be1c
children 2a952b378cdc
files dw/fltkui.cc dw/image.cc dw/layout.cc lout/object.cc
diffstat 4 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkui.cc	Sun May 08 22:58:39 2011 +0000
+++ b/dw/fltkui.cc	Tue May 10 21:07:30 2011 +0000
@@ -235,7 +235,7 @@
 
 FltkLabelButtonResource::~FltkLabelButtonResource ()
 {
-   delete label;
+   free((char *)label);
 }
 
 Fl_Widget *FltkLabelButtonResource::createNewWidget (core::Allocation
@@ -450,7 +450,7 @@
    if (initText)
       delete initText;
    if (label)
-      delete label;
+      free((char *)label);
 }
 
 Fl_Widget *FltkEntryResource::createNewWidget (core::Allocation
@@ -885,7 +885,7 @@
       if (menu[i].text)
          free((char *) menu[i].text);
    }
-   delete menu;
+   delete[] menu;
 }
 
 void FltkOptionMenuResource::setWidgetStyle (Fl_Widget *widget,
@@ -961,7 +961,7 @@
    newMenu = new Fl_Menu_Item[itemsAllocated];
    memcpy(newMenu, menu, itemsUsed * sizeof(Fl_Menu_Item));
    memset(newMenu + itemsUsed, 0, 0x10 * sizeof(Fl_Menu_Item));
-   delete menu;
+   delete[] menu;
    menu = newMenu;
    ch->menu(menu);
    ch->value(selected);
--- a/dw/image.cc	Sun May 08 22:58:39 2011 +0000
+++ b/dw/image.cc	Tue May 10 21:07:30 2011 +0000
@@ -157,7 +157,7 @@
 Image::~Image()
 {
    if (altText)
-      delete altText;
+      free(altText);
    if (buffer)
       buffer->unref ();
    if (mapKey)
--- a/dw/layout.cc	Sun May 08 22:58:39 2011 +0000
+++ b/dw/layout.cc	Tue May 10 21:07:30 2011 +0000
@@ -174,7 +174,7 @@
 
 Layout::Anchor::~Anchor ()
 {
-   delete name;
+   free(name);
 }
 
 // ---------------------------------------------------------------------
--- a/lout/object.cc	Sun May 08 22:58:39 2011 +0000
+++ b/lout/object.cc	Tue May 10 21:07:30 2011 +0000
@@ -224,7 +224,7 @@
 String::~String ()
 {
   if (str)
-    delete str;
+    free((char *)str);
 }
 
 // ------------