summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-26 17:03:15 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-28 22:42:46 -0400
commit19b534f7de7298ae76b173b69e7855ed84a0eb09 (patch)
tree2f432a4764f3cb280fdc1f312f230cf9ee710660 /gtk/gtkmain.c
parent910f23ea19369ead96b4c4c706203eac13985575 (diff)
downloadgtk+-19b534f7de7298ae76b173b69e7855ed84a0eb09.tar.gz
Avoid copying static debug strings
The g_source_set_name calls were showing up as a major source of strdups in our profiles. Avoid that by using new GLib api when available.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 9a7b36eb05..e498822212 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -868,7 +868,7 @@ gtk_main_sync (void)
store.store_loop = g_main_loop_new (NULL, TRUE);
store.timeout_id = g_timeout_add_seconds (10, (GSourceFunc) sync_timed_out_cb, &store);
- g_source_set_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
+ gdk_source_set_static_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
if (g_main_loop_is_running (store.store_loop))
g_main_loop_run (store.store_loop);