Common Questions about GTK

Common Questions: "1.4.


How does memory management work in GTK+? Should I free data returned from functions?


See the documentation for GObject and GtkObject. For GObject note specifically g_object_ref() and g_object_unref(). GtkObject is a subclass of GObject so the same points apply, except that it has a 'floating' state (explained in its documentation).

For strings returned from functions, they will be declared 'const' (using G_CONST_RETURN) if they should not be freed. Non-const strings should be freed with g_free(). Arrays follow the same rule. (If you find an exception to the rules, please report a bug to http://bugzilla.gnome.org.)"

留言

Google

本月熱門文章

水電行介紹---台北市大同區塔城街17號的富安水電行---斷垣殘壁內找到的甲級電匠師傅^^!!

熱門文章

企鵝妹/柳允進 史上最暈的TT三分鐘完整版一次看個夠

香港朋友,真的對唔住,台灣出了這種中共的幫兇!

陳昇 Bobby Chen【把悲傷留給自己 I left sadness to myself】Official Music Video

裝潢師傅貼圖來了唷

[黑金] 台南88槍擊案主犯國民黨學甲區黨部主委王文宗 也擔任統促黨幹部

新手自建監控雲最快的方式:推薦QNAP NAS 搭配QVR Pro

堅持5個月!反送中示威者六大特色 6 features of Hong Kong Anti-ELAB Protesters│老外看香港│郝毅博 Ben Hedges│新唐人電視台

香港朋友看服貿 - 嗨,我是香港人,一個CEPA的受害者。