- for (int i = 0; i < self->plugins->len; i++) {
- GisPluginStore *store = g_ptr_array_index(self->plugins, i);
+ for (GList *cur = self->plugins; cur; cur = cur->next) {
+ GisPluginStore *store = cur->data;
+ g_debug("GisPlugin: freeing %s refs=%d->%d", store->name,
+ G_OBJECT(store->plugin)->ref_count,
+ G_OBJECT(store->plugin)->ref_count-1);