RE: [gtk-list] Memory Management




You didn't tell us what you are using these strings/structures for.
It is likely that you can free them (certainly for CList column
titles). GTK generally takes a copy of this type of data.

-tony


On 20-Mar-2000 Jon Keating wrote:
> I have some questions about memory management.. I couldn't find any
> specific item in the tutorial or FAQ about it.
> 
> I'm using g_strdup_printf(...) to create my title..
> gchar *title = g_strdup_printf(...);
> 
> Is it ok to g_free(title); at the bottom of this function?  And I
> have
> some structures that I create with g_new0(...) do I need to
> g_free()
> it as well?
> I'm just concernted about my program having memory leaks that can
> be
> avoided.
> 
> Any advice or direction to a document will be greatly appreciated.
> 
> Thanks,
> Jon
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null

---
E-Mail: trog@gtk.org
Cynic, n.:
	Experienced.

Go Bezerk! http://www.gtk.org/~trog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]