I did not know this leak memory or not (gtk_object_set_data)
- From: "chao yeaj" <yeajchao gmail com>
- To: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: I did not know this leak memory or not (gtk_object_set_data)
- Date: Sat, 8 Jul 2006 21:16:14 +0800
Hello everyone
I use function ``gtk_object_set_data'' to set data to object
my code like this:
/***********************************************************************************/
guint *p = NULL;
p = g_malloc0(sizeof(guint)):
gtk_object_set_data(GTK_OBJECT(button),"key",p);
/*********************************************************************************/
I did not know whether I should add the following code or not
/***************************************************************/
g_free(p);
/*******************************************************************/
I need your hints
Any comments would be much appricated,thanks in advance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]