diff --git a/data/valgrind.sh b/data/valgrind.sh index 9f9d6a607..2198f41d1 100755 --- a/data/valgrind.sh +++ b/data/valgrind.sh @@ -29,3 +29,6 @@ while true; do done wait ${PID} + +# export PYTHONMALLOC=malloc +# valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --gen-suppressions=all --suppressions=./data/valgrind.supp python3 ./source/frontend/carla diff --git a/source/backend/utils/Windows.cpp b/source/backend/utils/Windows.cpp index 9e4e74ca8..61f1ec70e 100644 --- a/source/backend/utils/Windows.cpp +++ b/source/backend/utils/Windows.cpp @@ -48,6 +48,7 @@ double carla_get_desktop_scale_factor() if (::Display* const display = XOpenDisplay(nullptr)) { XrmInitialize(); + if (char* const rms = XResourceManagerString(display)) { if (const XrmDatabase sdb = XrmGetStringDatabase(rms)) @@ -64,8 +65,11 @@ double carla_get_desktop_scale_factor() if (carla_isNotZero(dpi)) return dpi / 96; } + + XrmDestroyDatabase(sdb); } } + XCloseDisplay(display); } #endif