diff --git a/src/slab_allocator.cc b/src/slab_allocator.cc index 45daf621a9..0e643f8c9f 100644 --- a/src/slab_allocator.cc +++ b/src/slab_allocator.cc @@ -49,10 +49,10 @@ SlabAllocator::SlabAllocator(unsigned int size) { SlabAllocator::~SlabAllocator() { if (!initialized_) return; - slab_sym_.Clear(); slab_sym_.Dispose(); - slab_.Clear(); + slab_sym_.Clear(); slab_.Dispose(); + slab_.Clear(); } @@ -92,8 +92,8 @@ char* SlabAllocator::Allocate(Handle obj, unsigned int size) { } if (slab_.IsEmpty() || offset_ + size > size_) { - slab_.Clear(); slab_.Dispose(); + slab_.Clear(); slab_ = Persistent::New(NewSlab(size_)); offset_ = 0; last_ptr_ = NULL;