[empathy] pixbuf_avatar_from_individual_closure_new: use the g_slice allocator
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] pixbuf_avatar_from_individual_closure_new: use the g_slice allocator
- Date: Wed, 4 Jul 2012 12:23:54 +0000 (UTC)
commit d3c53c44780da382ed2bf17fbcff9d71b234e48d
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Jul 4 14:10:20 2012 +0200
pixbuf_avatar_from_individual_closure_new: use the g_slice allocator
We are likely to allocate a bunch of those so best to use the g_slice
allocator.
libempathy-gtk/empathy-ui-utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 3c9e40b..7c6c6a7 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -584,7 +584,7 @@ pixbuf_avatar_from_individual_closure_new (FolksIndividual *individual,
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL);
- closure = g_new0 (PixbufAvatarFromIndividualClosure, 1);
+ closure = g_slice_new0 (PixbufAvatarFromIndividualClosure);
closure->result = g_object_ref (result);
closure->width = width;
closure->height = height;
@@ -601,7 +601,7 @@ pixbuf_avatar_from_individual_closure_free (
{
g_clear_object (&closure->cancellable);
g_object_unref (closure->result);
- g_free (closure);
+ g_slice_free (PixbufAvatarFromIndividualClosure, closure);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]