admin管理员组文章数量:1345476
(Using GTK 4.8 on Debian)
I created a file filter for specific image suffixes:
GtkFileFilter *file_filter = gtk_file_filter_new ();
gtk_file_filter_add_suffix (file_filter, "png");
gtk_file_filter_add_suffix (file_filter, "jpg");
gtk_file_filter_add_suffix (file_filter, "gif");
I then associated the file filter with a file chooser.
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER(file_chooser), file_filter );
How do I properly finalize the file filter?
- Does it have a reference count incremented by the file chooser, so destroying the file chooser also destroys the file filter?
- Do I need to explicitly decrement the reference count using
g_object_unref(file_filter)
? - Something else?
I ask because the second option, g_object_unref(file_filter)
, gives me a runtime error g_object_unref: assertion 'G_IS_OBJECT (object)' failed
.
本文标签: cProperly finalizing a GTK4 file filterStack Overflow
版权声明:本文标题:c - Properly finalizing a GTK4 file filter - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743748855a2532270.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论