After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683815 - Allow calling gdk_display_close
Allow calling gdk_display_close
Status: RESOLVED DUPLICATE of bug 85715
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-11 18:01 UTC by William Jon McCann
Modified: 2014-01-25 02:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Free all references to displays in dispose (12.88 KB, patch)
2012-09-11 18:01 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2012-09-11 18:01:52 UTC
It would be nice in some cases to support calling gdk_display_close after you
are done with the main loop. This makes it much easier to inspect leak reports
from valgrind because if we don't close the display we don't close screens
and a bunch of windows. Many resources in GTK+ are tied to the lifecycle
of the display and/or screen.

The biggest problem with doing this is that many things are called in finalize
that still reference the display and screen. I think it is better to free
references and resources that interact with other classes in dispose instead
of finalize.
Comment 1 William Jon McCann 2012-09-11 18:01:55 UTC
Created attachment 224035 [details] [review]
Free all references to displays in dispose

So that we exit cleanly if display_close is called.
Comment 2 Matthias Clasen 2012-09-11 19:57:44 UTC
Thanks for the patch, this will need careful review.
Comment 3 Matthias Clasen 2014-01-25 02:20:15 UTC

*** This bug has been marked as a duplicate of bug 85715 ***