GtkPrintBackend not being finalized/disposed when running the "Printing" dialog from Gtk Demo binary after compiling GTK
Steps to reproduce
- Compile gtk (
meson setup --prefix /opt/gtk _builddir && cd _builddir && ninja && ninja install
) - Export new library path:
export LD_LIBRARY_PATH="/opt/gtk/lib/x86_64-linux-gnu/"
- Run Gtk Demo binary:
/opt/gtk/bin/gtk4-demo
- Run and close the "Printing" dialog
Current behavior
When opening the "Printing" dialog from Gtk4 Demo binary, I get CUPS Backend: Initializing CUPS backend module
on the terminal.
But after closing the "Printing" dialog, GtkPrintBackend doesn't seem to get finalized, and nothing is logged on the terminal.
I am designing my own GtkPrintBackend, and mine doesn't get finalized either.
Also, the memory increases roughly by 10MB every 3-4 times I open and close the Print Dialog (if I am not mistaken). The memory is freed only when I close the entire Gtk4 Demo binary.
However, the "Page Setup" dialog, everything seems to be working fine.
When opening the "Page Setup" dialog, I get CUPS Backend: Initializing CUPS backend module
and when closing it, I get
CUPS Backend: gtk_print_backend_cups_dispose
CUPS Backend: gtk_print_backend_cups_dispose
CUPS Backend: finalizing CUPS backend module
as expected.
Expected outcome
GtkPrintDialog gets finalized every time I close the "Printing" Dialog.
Version information
Compiling latest version of GTK cloned from github.