The first polygon wasn't freed as only the subsequent elements where freed.
Also the data elements where freed after been unref, this is a bit odd.
polygons = priv->polygons;
while (polygons != NULL)
{
- ChamplainPolygon *polygon;
-
- polygon = CHAMPLAIN_POLYGON (polygons->data);
+ g_object_unref (G_OBJECT (polygons->data));
polygons = polygons->next;
- g_object_unref (polygon);
- priv->polygons = g_list_remove (polygons, polygon);
}
+ g_list_free (priv->polygons);
if (priv->goto_context != NULL)
champlain_view_stop_go_to (view);