static GSList* area_add(GSList *list, Rect *a)
{
- Rect *r = g_new(Rect, 1);
+ Rect *r = g_slice_new(Rect);
*r = *a;
return g_slist_prepend(list, r);
}
}
/* 'r' is not being added to the result list, so free it */
- g_free(r);
+ g_slice_free(Rect, r);
}
}
g_slist_free(list);
}
while (spaces) {
- g_free(spaces->data);
+ g_slice_free(Rect, spaces->data);
spaces = g_slist_delete_link(spaces, spaces);
}
}