GSource reference counting semantics are completely undocumented :(
Submitted by Ryan Beasley
Link to original bug (#662257)
Description
A project I work on uses GLib's main loop at its core. I usually come back to this project after a few (or many) months working on other stuff, so I have a tendency to forget a fair amount of specific knowledge about GLib, and I have to resort to the published APIs at http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSource .
One thing I've repeatedly had to fall back to reading sources to figure out are the reference counting semantics for event sources. It would be extremely helpful if the docs noted a returned source's initial reference count (g_source_new: 1 vs. g_timeout_add: 2, since attaching it to a context increments the count?), such that users know when they have to clean things up and how.
Thanks!