]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
properly delete pointers
authorKevin Zhang <kzhaaang@gmail.com>
Sun, 27 May 2018 15:39:10 +0000 (11:39 -0400)
committerKevin Zhang <kzhaaang@gmail.com>
Sun, 27 May 2018 15:39:10 +0000 (11:39 -0400)
entityx/help/Pool_test.cc

index 56ca85af346e15829e13a030d1fa0d8382e28957..631ccec49f3553442abe56959671f10f3af362e9 100644 (file)
@@ -64,6 +64,8 @@ TEST_CASE("TestPoolPointers") {
   REQUIRE(extrapolated_p16 !=  static_cast<void*>(p16));
   void *extrapolated_p24 = p16 + 8 * sizeof(Position);
   REQUIRE(extrapolated_p24 !=  static_cast<void*>(p24));
+
+  for (auto ptr : ptrs) delete[] ptr;
 }
 
 TEST_CASE("TestDeconstruct") {