Holger
September 17, 2024, 9:39am
1
I use a GtkCustomFilter in my program, and everything seems to work.
The filter is created with the following function.
GtkCustomFilter* filter = gtk_custom_filter_new ((GtkCustomFilterFunc) match_func, data, (GDestroyNotify)destroy_notify);
However, I have not yet managed to call up the function destroy_notify
.
The documentation says:
“If a previous function was set, its user_destroy
will be called now.”
What function does this mean?
match_func
or gtk_filter_changed()
.
andyholmes
(Andy Holmes)
September 17, 2024, 6:57pm
2
That means destroy_notify
will be called on data
.
Holger
September 18, 2024, 7:03am
3
Thank you for the answer. The point, however, is that the following function is never called. Why?
void destroy_notify(gpointer *data)
{
g_print("Destroy_Notify\n");
}
ebassi
(Emmanuele Bassi)
September 18, 2024, 7:05am
4
The destroy function will be called when the GtkCustomFilter
instance is finalized, which happens when the last reference held on the filter object is released.