From fc3d3a5499f24927add5afc75126c7e7a822e313 Mon Sep 17 00:00:00 2001 From: Seppi Wilhelmi Date: Tue, 31 Oct 2023 16:53:40 +0100 Subject: [PATCH] Make GQuark register intentional leaks --- glib/gquark.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/gquark.c b/glib/gquark.c index 9c1d221a1..797e257de 100644 --- a/glib/gquark.c +++ b/glib/gquark.c @@ -43,6 +43,7 @@ #include "gtestutils.h" #include "glib_trace.h" #include "glib-init.h" +#include "glib-private.h" #define QUARK_BLOCK_SIZE 2048 #define QUARK_STRING_BLOCK_SIZE (4096 - sizeof (gsize)) @@ -295,6 +296,7 @@ quark_new (gchar *string) * us to do lockless lookup of the arrays, and there shouldn't be that * many quarks in an app */ + g_ignore_leak (g_atomic_pointer_get (&quarks)); g_atomic_pointer_set (&quarks, quarks_new); }