PDA

View Full Version : Is this a memory leak? C



zootreeves
September 19th, 2006, 02:33 AM
Hi,

I've never really consider memory usage before that much, but i'm writing a program now where it is important and i'm wondering is this a memory leak?



gchar * my_string;
my_string = g_strdup_printf("Pointer assigned once");
my_string = g_strdup_printf("Pointer assigned again");
g_free(my_string);


Thanks

angustia
September 19th, 2006, 06:12 AM
yap, between second and third lines.