# HG changeset patch # User William Pitcock # Date 1189560810 18000 # Node ID 0970c745a497db38d436bfb86172d538dc0a7430 # Parent 6d385ae0e97a2e9e5445d6094cf58c8c8982d122 Use GSlice for VisNode structs. diff -r 6d385ae0e97a -r 0970c745a497 src/audacious/input.c --- a/src/audacious/input.c Tue Sep 11 20:30:41 2007 -0500 +++ b/src/audacious/input.c Tue Sep 11 20:33:30 2007 -0500 @@ -128,10 +128,16 @@ void free_vis_data(void) { + GList *iter; + G_LOCK(vis_mutex); - g_list_foreach(vis_list, (GFunc) g_free, NULL); + + MOWGLI_ITER_FOREACH(iter, vis_list) + g_slice_free(VisNode, iter->data); + g_list_free(vis_list); vis_list = NULL; + G_UNLOCK(vis_mutex); } @@ -262,7 +268,7 @@ max /= 2; max = CLAMP(max, 0, 512); - vis_node = g_new0(VisNode, 1); + vis_node = g_slice_new0(VisNode); vis_node->time = time; vis_node->nch = nch; vis_node->length = max; @@ -370,7 +376,7 @@ if (ret > 0) { g_free(filename_proxy); - pr = g_new0(ProbeResult, 1); + pr = g_slice_new0(ProbeResult, 1); pr->ip = ip; return pr; }