General GTK Question : When to Free, when to unref, etc.
- From: Setzer- <setzer sm-soft org>
- To: gtk-app-devel-list gnome org
- Subject: General GTK Question : When to Free, when to unref, etc.
- Date: Fri, 12 Nov 2004 21:53:04 -0500
I'd like to know in which cases should I free char pointers returned by
the various GTK functions,
such as gtk_entry_get_text, gtk_tree_model_get, g_locale_from_utf8, etc.
Likely, when should source pointers be freed, with functions like
gtk_list_store_set, g_locale_to_utf8, etc.
It isn't always clear what is being done with the stuff.
I've also been told to use ' g_object_unref ', yet I've never heard of
it in the tutorials, or anywhere else.
Is it important to use it? In which cases?
(I'm trying to reduce memory leaks and crashes in my gtk apps...)
Note: GTK version used is 2.4.10 / win32 (win98se)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]