mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 04:09:20 +02:00
gcleanup: Implementation of GCleanupScope and associated macros
Add a new type GCleanupScope that stores a list of things to "clean up" when g_cleanup_clean() is called. More importantly, define some macros (G_CLEANUP, etc) that facilitate conditionally building a per-library/executable cleanup list if G_DEBUG=cleanup is specified. The cleanup list is run at destructor time. -DG_CLEANUP_SCOPE defines the name of the cleanup list and enables the feature for a given module. Concept and initial work: Ryan Lortie <desrt@desrt.ca> https://bugzilla.gnome.org/show_bug.cgi?id=627423
This commit is contained in:
@@ -3241,3 +3241,18 @@ g_hostname_is_ascii_encoded
|
||||
<SUBSECTION>
|
||||
g_hostname_is_ip_address
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gcleanup</FILE>
|
||||
<TITLE>Cleanup</FILE>
|
||||
G_CLEANUP_SCOPE
|
||||
G_CLEANUP_DEFINE
|
||||
G_CLEANUP
|
||||
G_CLEANUP_IN_PHASE
|
||||
G_CLEANUP_FUNC
|
||||
G_CLEANUP_FUNC_IN_PHASE
|
||||
g_cleanup_is_enabled
|
||||
g_cleanup_list_push
|
||||
g_cleanup_list_remove
|
||||
g_cleanup_list_clean
|
||||
</SECTION>
|
||||
|
Reference in New Issue
Block a user