]> Dogcows Code - chaz/openbox/blobdiff - openbox/prompt.c
more using g_slice_new() instead of g_new()
[chaz/openbox] / openbox / prompt.c
index e73545a51b7227850d436de9455b632ac81325c5..6df991a4af0dc9ad72de02c33f2616cd1895dc67 100644 (file)
@@ -152,7 +152,7 @@ ObPrompt* prompt_new(const gchar *msg, const gchar *title,
 
     attrib.override_redirect = FALSE;
 
-    self = g_new0(ObPrompt, 1);
+    self = g_slice_new0(ObPrompt);
     self->ref = 1;
     self->func = func;
     self->cleanup = cleanup;
@@ -250,7 +250,7 @@ void prompt_unref(ObPrompt *self)
 
         XDestroyWindow(obt_display, self->msg.window);
         XDestroyWindow(obt_display, self->super.window);
-        g_free(self);
+        g_slice_free(ObPrompt, self);
     }
 }
 
This page took 0.020649 seconds and 4 git commands to generate.