+ m_toSpaceLock.Init();
+}
+
+CopiedSpace::~CopiedSpace()
+{
+ while (!m_oldGen.toSpace->isEmpty())
+ m_heap->blockAllocator().deallocate(CopiedBlock::destroy(m_oldGen.toSpace->removeHead()));
+
+ while (!m_oldGen.fromSpace->isEmpty())
+ m_heap->blockAllocator().deallocate(CopiedBlock::destroy(m_oldGen.fromSpace->removeHead()));
+
+ while (!m_oldGen.oversizeBlocks.isEmpty())
+ m_heap->blockAllocator().deallocateCustomSize(CopiedBlock::destroy(m_oldGen.oversizeBlocks.removeHead()));
+
+ while (!m_newGen.toSpace->isEmpty())
+ m_heap->blockAllocator().deallocate(CopiedBlock::destroy(m_newGen.toSpace->removeHead()));
+
+ while (!m_newGen.fromSpace->isEmpty())
+ m_heap->blockAllocator().deallocate(CopiedBlock::destroy(m_newGen.fromSpace->removeHead()));
+
+ while (!m_newGen.oversizeBlocks.isEmpty())
+ m_heap->blockAllocator().deallocateCustomSize(CopiedBlock::destroy(m_newGen.oversizeBlocks.removeHead()));
+
+ ASSERT(m_oldGen.toSpace->isEmpty());
+ ASSERT(m_oldGen.fromSpace->isEmpty());
+ ASSERT(m_oldGen.oversizeBlocks.isEmpty());
+ ASSERT(m_newGen.toSpace->isEmpty());
+ ASSERT(m_newGen.fromSpace->isEmpty());
+ ASSERT(m_newGen.oversizeBlocks.isEmpty());