[vmkit-commits] [vmkit] r70045 - /vmkit/trunk/lib/Mvm/Runtime/Object.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sat Apr 25 07:44:48 PDT 2009


Author: geoffray
Date: Sat Apr 25 09:44:46 2009
New Revision: 70045

URL: http://llvm.org/viewvc/llvm-project?rev=70045&view=rev
Log:
Delete the previous tables after changing them.


Modified:
    vmkit/trunk/lib/Mvm/Runtime/Object.cpp

Modified: vmkit/trunk/lib/Mvm/Runtime/Object.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Runtime/Object.cpp?rev=70045&r1=70044&r2=70045&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/Runtime/Object.cpp (original)
+++ vmkit/trunk/lib/Mvm/Runtime/Object.cpp Sat Apr 25 09:44:46 2009
@@ -170,12 +170,14 @@
     uint32 newLength = QueueLength * GROW_FACTOR;
     gc** newQueue = new gc*[newLength];
     for (uint32 i = 0; i < QueueLength; ++i) newQueue[i] = FinalizationQueue[i];
+    delete[] FinalizationQueue;
     FinalizationQueue = newQueue;
     QueueLength = newLength;
     
     newLength = ToBeFinalizedLength * GROW_FACTOR;
     newQueue = new gc*[newLength];
     for (uint32 i = 0; i < ToBeFinalizedLength; ++i) newQueue[i] = ToBeFinalized[i];
+    delete[] ToBeFinalized;
     ToBeFinalized = newQueue;
     ToBeFinalizedLength = newLength;
   }





More information about the vmkit-commits mailing list