comparison src/gtkimhtml.c @ 4138:6b2d0ce7fb18

[gaim-migrate @ 4356] this should fix some memory leaks, thanks to ari for taking the time to work on this committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 25 Dec 2002 02:13:35 +0000
parents 4a3f863b041f
children d03ace5af8da
comparison
equal deleted inserted replaced
4137:22875a399312 4138:6b2d0ce7fb18
130 static void 130 static void
131 gtk_imhtml_finalize (GObject *object) 131 gtk_imhtml_finalize (GObject *object)
132 { 132 {
133 GtkIMHtml *imhtml = GTK_IMHTML(object); 133 GtkIMHtml *imhtml = GTK_IMHTML(object);
134 134
135 g_hash_table_foreach_remove(imhtml->smiley_data, gtk_smiley_tree_destroy, NULL); 135 g_hash_table_foreach_remove(imhtml->smiley_data, (GHRFunc)gtk_smiley_tree_destroy, NULL);
136 g_hash_table_destroy(imhtml->smiley_data);
136 gtk_smiley_tree_destroy(imhtml->default_smilies); 137 gtk_smiley_tree_destroy(imhtml->default_smilies);
138 gdk_cursor_unref(imhtml->hand_cursor);
139 gdk_cursor_unref(imhtml->arrow_cursor);
137 G_OBJECT_CLASS(parent_class)->finalize (object); 140 G_OBJECT_CLASS(parent_class)->finalize (object);
138 } 141 }
139 142
140 /* Boring GTK stuff */ 143 /* Boring GTK stuff */
141 static void gtk_imhtml_class_init (GtkIMHtmlClass *class) 144 static void gtk_imhtml_class_init (GtkIMHtmlClass *class)
900 default: 903 default:
901 break; 904 break;
902 } 905 }
903 c += tlen; 906 c += tlen;
904 pos += tlen; 907 pos += tlen;
908 if(tag)
909 g_free(tag); /* This was allocated back in VALID_TAG() */
905 } else if (*c == '&' && gtk_imhtml_is_amp_escape (c, &amp, &tlen)) { 910 } else if (*c == '&' && gtk_imhtml_is_amp_escape (c, &amp, &tlen)) {
906 ws [wpos++] = amp; 911 ws [wpos++] = amp;
907 c += tlen; 912 c += tlen;
908 pos += tlen; 913 pos += tlen;
909 } else if (*c == '\n') { 914 } else if (*c == '\n') {