mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
A lot of our data structures are reference counted these days. It can be useful to allow creating reference counted data without necessarily duplicating all the reference counting machinery — a field in the struct, reference and unreference functions, a GDestroyNotify-compatible function for destroying the contents. We can re-use the same overallocation and pointer offset trick we use when allocating a GTypeInstance in gobject, and add all the reference counting meta-information directly on top of the allocation size. https://bugzilla.gnome.org/show_bug.cgi?id=622721