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 Search

推薦內容橫式

本月熱門文章

什麼是 OTA ?

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

老鼠會有哪些傳染病,該注意那些事情

QNAP攜手阿里雲談混合雲下的數據保護與備份 Hybrid Backup Sync

水電材料行介紹---臺北市大同區延平北路4段68號的隆成電料行 ---ok便利商店正對面, 15年歷史的電料行!

一般民眾針對老鼠問題該如何因應

工業物聯網 OPC UA 學習筆記

日本女星竹內結子 泡沫時代後最溫暖的笑容:竹內結子...追憶日劇女王1980-2020

北海道小樽的甜點之塔 LeTAO

柯文哲動用第二預備金 救命錢來拍廣告 ... 無法想像

這個網誌中的熱門文章

Android應用開發豆知識:利用 adb 安裝 apk 到裝置上

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

Google Play 推薦Android app 誠徵App排行榜

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

[家教][社會觀察] 建中教我的事 沒上建中被父母親折磨? 在建中到底是如何 ...

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

[品質控制] 什麼是Sanity test ? 軟體測試常見名詞整理 包含不同部門的測試人員負責範圍

Acer ICONIA Smart S300 更新後越來越好 Acer也有出手機?!

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales