Fix memory leak of and use without initialization.
Arena allocator's empty arena needs to be released in a destructor, this
removes the neeed for Reset.
The DataflowIterator needs to clear changed_ upon construction to avoid use
without initialization.
Change-Id: I56e3cb8c3e06c08ab0ff42447bd6e05792fc70af
diff --git a/src/compiler/dex/arena_allocator.h b/src/compiler/dex/arena_allocator.h
index 53d1a1b..26294b6 100644
--- a/src/compiler/dex/arena_allocator.h
+++ b/src/compiler/dex/arena_allocator.h
@@ -47,8 +47,8 @@
};
ArenaAllocator(size_t default_size = ARENA_DEFAULT_BLOCK_SIZE);
+ ~ArenaAllocator();
void* NewMem(size_t size, bool zero, ArenaAllocKind kind);
- void ArenaReset();
size_t BytesAllocated() {
return malloc_bytes_;
}