GObject說明 The Base Object Type
The Base Object Type: "Description
主要是想要知道為什麼在宣告一個GObject A之後要先做g_object_ref(A)。
宣告跟g_object_ref(A)有什麼不同,
以及g_object_unref(A)跟g_object_ref_sink(A)分別是什麼意思。
GObject is the fundamental type providing the common attributes and methods for all object types in GTK+, Pango and other libraries based on GObject. The GObject class provides methods for object construction and destruction, property access methods, and signal support. Signals are described in detail in Signals(3).
GInitiallyUnowned is derived from GObject. The only difference between the two is that the initial reference of a GInitiallyUnowned is flagged as a floating reference. This means that it is not specifically claimed to be 'owned' by any code portion. The main motivation for providing floating references is C convenience"
留言
張貼留言