mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 02:17:51 +02:00
gutils: Add a private API to unset the cached temporary directory
We may need to avoid using a cached temp directory for testing purposes, so let's provide an internal API to perform such task. This implies removing GOnce and going with mutex-based version, but that's still using atomic logic in most unix implementations anyways.
This commit is contained in:
@@ -840,6 +840,19 @@
|
||||
fun:g_set_user_dirs
|
||||
}
|
||||
|
||||
# _g_unset_cached_tmp_dir() deliberately leaks the previous cached g_get_tmp_dir() values.
|
||||
# These will not all be reachable on exit.
|
||||
{
|
||||
g_get_tmp_dir
|
||||
Memcheck:Leak
|
||||
match-leak-kinds:definite,reachable
|
||||
fun:malloc
|
||||
...
|
||||
fun:g_get_tmp_dir
|
||||
...
|
||||
fun:g_test_init
|
||||
}
|
||||
|
||||
# g_get_system_data_dirs() caches a one-time allocation
|
||||
{
|
||||
g_get_system_data_dirs
|
||||
|
Reference in New Issue
Block a user