From 6a9632b89c0a22c7860bad07a5dbf4d5c9c8c77c Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 3 Dec 2020 18:56:51 +0800 Subject: [PATCH] Fix memory leak --- edxp-core/src/main/cpp/main/src/edxp_context.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/edxp-core/src/main/cpp/main/src/edxp_context.cpp b/edxp-core/src/main/cpp/main/src/edxp_context.cpp index c9833e60..331e18c5 100644 --- a/edxp-core/src/main/cpp/main/src/edxp_context.cpp +++ b/edxp-core/src/main/cpp/main/src/edxp_context.cpp @@ -59,6 +59,7 @@ namespace edxp { } void Context::PreLoadDex(const std::vector &dex_paths) { + if (LIKELY(!dexes.empty())) return; for (const auto &path: dex_paths) { std::ifstream is(path, std::ios::binary); if (!is.good()) {