Mercurial > audlegacy
diff src/audacious/input.c @ 3516:0970c745a497 trunk
Use GSlice for VisNode structs.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 11 Sep 2007 20:33:30 -0500 |
parents | b413aa0c939c |
children | b747ad540903 |
line wrap: on
line diff
--- 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; }