There are two functions in GLib that work with the reference counting of the GObject objects:
g_object_ref