There are two functions in GLib that work with the reference counting of the GObject objects:
g_object_refincreases reference count of the object, doesn't handle floating references.g_object_ref_sinkincreases reference count of the object or just removes floating flag from the object if the reference is floating.
Since we don't know if the object is floating or not, we should always use g_object_ref_sink, shouldn't we? If I am wrong, when should we use g_object_ref and when should we use g_object_ref_sink? Should we use g_object_ref_sink only for GInitiallyUnowned objects?