From 7395456b7cfe0b0fda7b58273e8e36b2b085eadb Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 26 Nov 2019 11:39:54 +0000 Subject: [PATCH] Deliberately leak android tool cache so it doesn't go out of scope * We need this to survive until shutdown, and global destruction order is undefined. --- renderdoc/android/android_tools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/android/android_tools.cpp b/renderdoc/android/android_tools.cpp index 6973d0a0d..69cad8d38 100644 --- a/renderdoc/android/android_tools.cpp +++ b/renderdoc/android/android_tools.cpp @@ -157,8 +157,8 @@ struct ToolPathCache static ToolPathCache &getCache() { - static ToolPathCache cache; - return cache; + static ToolPathCache *cache = new ToolPathCache; + return *cache; } std::string getToolPath(ToolDir subdir, const std::string &toolname, bool checkExist)