diff options
Diffstat (limited to 'src/heap.cc')
| -rw-r--r-- | src/heap.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/heap.cc b/src/heap.cc index fe5ca7a90d..1efc956452 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -146,7 +146,10 @@ void Heap::Init(size_t initial_size, size_t maximum_size, size_t growth_size, } void Heap::Destroy() { - ScopedHeapLock lock; + // We can't take the heap lock here because there might be a daemon thread suspended with the + // heap lock held. We know though that no non-daemon threads are executing, and we know that + // all daemon threads are suspended, and we also know that the threads list have been deleted, so + // those threads can't resume. We're the only running thread, and we can do whatever we like... STLDeleteElements(&spaces_); if (mark_bitmap_ != NULL) { delete mark_bitmap_; |