destroing data attached to a type (qdata)
- From: Stefan Kost <ensonic hora-obscura de>
- To: gtk-app-devel-list gnome org
- Subject: destroing data attached to a type (qdata)
- Date: Mon, 12 May 2008 12:42:36 +0200
hi,
I have an interface, where I share some data between the instances.
the data is created on first access. Now I also would like to release
it when the last instance goes.
problem 1: base_finalize() is not called for static types
I thought that I could do some own ref-counting and then do
g_object_weak_ref on the instances to decrement the ref-count.
problem 2: There is nothing in the GTypeInfo for an iface that is
called for each new instance (using instance_init causes
g_type_register_static (G_TYPE_INTERFACE,...) to fail as one does not
really instantiate the iface, but the type that implements it).
Any ideas?
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]