pa_assert(core);
c = pa_xnew(pa_dbusiface_core, 1);
- c->core = pa_core_ref(core);
+ c->core = core;
c->subscription = pa_subscription_new(core, PA_SUBSCRIPTION_MASK_ALL, subscription_cb, c);
c->dbus_protocol = pa_dbus_protocol_get(core);
c->cards = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
pa_source_unref(c->fallback_source);
pa_dbus_protocol_unref(c->dbus_protocol);
- pa_core_unref(c->core);
pa_xfree(c);
}
pa_assert(core);
m = pa_xnew(pa_dbusiface_memstats, 1);
- m->core = pa_core_ref(core);
+ m->core = core;
m->path = pa_sprintf_malloc("%s/%s", PA_DBUS_CORE_OBJECT_PATH, OBJECT_NAME);
m->dbus_protocol = pa_dbus_protocol_get(core);
pa_xfree(m->path);
pa_dbus_protocol_unref(m->dbus_protocol);
- pa_core_unref(m->core);
pa_xfree(m);
}
p = pa_xnew(pa_dbus_protocol, 1);
PA_REFCNT_INIT(p);
- p->core = pa_core_ref(c);
+ p->core = c;
p->objects = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
p->connections = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
p->extensions = pa_idxset_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
pa_assert_se(pa_shared_remove(p->core, "dbus-protocol") >= 0);
- pa_core_unref(p->core);
-
pa_xfree(p);
}