Hi all:
I met some questions when I read the gdk.
It is from gtkfontsel.c
I've found that 'temp_info.family' has been allocated some memory
with g_strdup() and i can't find where it was freed?
Is there anybody can tell me?
static void
gtk_font_selection_insert_font (GSList *fontnames[],
gint *ntable,
gchar *fontname)
{
FontInfo *table;
FontInfo temp_info;
.......
temp_info.family = family_exists ? family :
g_strdup(family);
temp_info.foundry = foundry;
temp_fontname = g_slist_prepend (NULL, fontname);
(*ntable)++;
if (*ntable > 1)
{
upper = *ntable - 1;
while (lower != upper)
{
table[upper] = table[upper-1];
fontnames[upper] = fontnames[upper-1];
upper--;
}
}
table[lower] = temp_info;
fontnames[lower] = temp_fontname;
}
i am victor,thank you! 11111