summaryrefslogtreecommitdiffstats
path: root/dexoptanalyzer
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2017-04-26 22:00:04 -0700
committerAndreas Gampe <agampe@google.com>2017-04-26 22:00:04 -0700
commit39f44b7452a7fa01c20f0e3554ff035726d9ebee (patch)
tree50e6a6e211d037c96d703cded8e7860861ce85a8 /dexoptanalyzer
parentb8cc1754535f27fff1f1cb8324a543797eaacbcd (diff)
downloadart-39f44b7452a7fa01c20f0e3554ff035726d9ebee.tar.gz
art-39f44b7452a7fa01c20f0e3554ff035726d9ebee.tar.bz2
art-39f44b7452a7fa01c20f0e3554ff035726d9ebee.zip
ART: Shut down runtime in dexoptanalyzer
Ensure that a created runtime is shut down properly. This avoids leaks. Bug: 37728223 Test: m SANITIZE_HOST=true test-art-host Change-Id: I123f30f916a5432e759e9ade72d50ebf0303cc0e
Diffstat (limited to 'dexoptanalyzer')
-rw-r--r--dexoptanalyzer/dexoptanalyzer.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/dexoptanalyzer/dexoptanalyzer.cc b/dexoptanalyzer/dexoptanalyzer.cc
index 965e4073ea..9a2eb7f8dd 100644
--- a/dexoptanalyzer/dexoptanalyzer.cc
+++ b/dexoptanalyzer/dexoptanalyzer.cc
@@ -216,6 +216,8 @@ class DexoptAnalyzer FINAL {
if (!CreateRuntime()) {
return kErrorCannotCreateRuntime;
}
+ std::unique_ptr<Runtime> runtime(Runtime::Current());
+
OatFileAssistant oat_file_assistant(dex_file_.c_str(), isa_, /*load_executable*/ false);
// Always treat elements of the bootclasspath as up-to-date.
// TODO(calin): this check should be in OatFileAssistant.