summaryrefslogtreecommitdiff
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index d76a8d149f..136b793ba1 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -317,7 +317,10 @@ Heap::Heap(size_t initial_size,
// Remove already loaded spaces.
for (space::Space* loaded_space : added_image_spaces) {
RemoveSpace(loaded_space);
+ delete loaded_space;
}
+ boot_image_spaces_.clear();
+ requested_alloc_space_begin = nullptr;
break;
}
}