remove temporarily the clean-up of newItems: might lead to problems with invalid...
[simple-launcher] / simple-launcher.cc
index 92657a8..8882292 100644 (file)
@@ -155,12 +155,13 @@ bool SimpleLauncherApplet::doInit(void *state_data, int *state_size) {
 
 SimpleLauncherApplet::~SimpleLauncherApplet() {
   myItems.clear();
-
+#if 0
+  // This does not seem to be necessary
   if (myWidget != NULL) {
     gtk_widget_destroy(myWidget);
     myWidget = NULL;
   }
-
+#endif
   if (myContext != NULL) {
     osso_deinitialize(myContext);
     myContext = NULL;
@@ -202,7 +203,7 @@ void SimpleLauncherApplet::loadConfig() {
       addItem(myItems, buffer, (p != NULL && (*p == '1' || *p == 'y' || *p == 'Y')));
     }
 
-    delete buffer;
+    delete [] buffer;
   }
 }
 
@@ -370,7 +371,7 @@ void SimpleLauncherApplet::runDialog() {
       ;     // FIXME: do I want to do anything in here?
   }
 
-  newItems.clear();
+  // newItems.clear(); // TODO: do I really need it?
 }
 
 // vim:ts=2:sw=2:et