Some GdkWindowImpl don't get finalized
Some GdkWindowImpl never get finalized, probably due to a missing unref in Gtk or Gdk. If you set a breakpoint to gdk_window_impl_BACKEND_init and gdk_window_impl_BACKEND_finalize, you can see that some get constructed but not destructed. For reference, I used gtk3-demo-application. You can see that
- Application window don't get finalized
- ToolButton Popup Menu get finalized
- the Inspector window get finalized (press CTRL+SHIFT+I or run with GTK_DEBUG=interactive)
- Tooltips don't get finalized
Tested on X11 and Win32 backends.
Steps to reproduce
- build a debug version of Gtk3
- open in gdb a test application linking to the debug Gtk
- set breakpoints to gdk_window_impl_init / gdk_window_impl_finalize for your backend
Current behavior
Missing gdk_window_impl_finalize() calls
Expected outcome
Number of gdk_window_impl_init() calls should equal number of gdk_window_impl_finalize() calls
Version information
- Which version of GTK+ you are using: Gtk3 3.22.30
- What operating system and version: Arch Linux and Win10
Additional information
- Found this while examining leaks for this bug report: issue 22
Edited by Luca Bacci