From a463b6a920a2a0bf14f9cca20a561b412b9349d1 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Fri, 12 Aug 2016 21:53:32 -0700 Subject: ART: Refactor ImageSpace loading Make the code more straightforward so it is easier to reason about and extend. Also change return types to unique pointers so it's clear that it is the caller's responsibility to free those when necessary. Bug: 30832951 Test: m test-art-host Test: device booting Change-Id: I3216eb702e45357a48af5158dacbe40e79bd1ae9 --- runtime/oat_file_assistant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/oat_file_assistant.h') diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h index effeabb126..3f018dceff 100644 --- a/runtime/oat_file_assistant.h +++ b/runtime/oat_file_assistant.h @@ -180,7 +180,7 @@ class OatFileAssistant { std::unique_ptr GetBestOatFile(); // Open and returns an image space associated with the oat file. - static gc::space::ImageSpace* OpenImageSpace(const OatFile* oat_file); + static std::unique_ptr OpenImageSpace(const OatFile* oat_file); // Loads the dex files in the given oat file for the given dex location. // The oat file should be up to date for the given dex location. -- cgit v1.2.3-59-g8ed1b