我尝试仅定期更新(单列)GtkTreeView第一行中的值,但RAM消耗却在不断增长!
简化摘录:
static GtkListStore* liststore;
...
gboolean first_row_updater_timeout(gpointer user_data G_GNUC_UNUSED) {
GtkTreeIter iter;
gtk_tree_model_get_iter_first(GTK_TREE_MODEL(liststore), &iter);
gtk_list_store_set (liststore, &iter, 0, "some text", -1);
return TRUE
}
在g_timeout_add(10, (GSourceFunc) first_row_updater_timeout, NULL);
我做错了什么?