Use the slice allocator for many small allocations.

2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelmap.c:
	* gtk/gtkactiongroup.c:
	* gtk/gtkdialog.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkgc.c:
	* gtk/gtkkeyhash.c:
	* gtk/gtkplug.c:
	* gtk/gtktextiter.c:
	* gtk/gtktextlayout.c:
	* gtk/gtkuimanager.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkxembed.c: Use the slice allocator for many small
	allocations.

	* gtk/gtkcolorsel.c:
	* gtk/gtktreeview.c: Use IPN.

	* gtk/gtkwidget.c: Remove an unused field from the AccelPath
	struct.
This commit is contained in:
Matthias Clasen
2006-01-04 07:06:12 +00:00
committed by Matthias Clasen
parent f827de4ec4
commit 04eceaf621
18 changed files with 166 additions and 95 deletions

View File

@ -702,7 +702,7 @@ icon_cache_element_free (IconCacheElement *element)
{
if (element->pixbuf)
g_object_unref (element->pixbuf);
g_free (element);
g_slice_free (IconCacheElement, element);
}
static void
@ -744,7 +744,7 @@ get_cached_icon (GtkWidget *widget,
element = g_hash_table_lookup (cache, name);
if (!element)
{
element = g_new0 (IconCacheElement, 1);
element = g_slice_new0 (IconCacheElement);
g_hash_table_insert (cache, g_strdup (name), element);
}