Proper destruction of DynamicTransferBuffer

This commit is contained in:
Pavel Kirienko
2014-02-05 19:35:14 +04:00
parent f707e889f9
commit c8c7a86f99
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -183,8 +183,8 @@ TEST(DynamicTransferBuffer, Basic)
ASSERT_EQ(21, buf.write(0, test_data_ptr, 21));
ASSERT_TRUE(matchAgainstTestData(buf, 0));
// Reset
// Destroying the object; memory should be released
ASSERT_LT(0, pool.getNumUsedBlocks());
buf.reset();
buf.~DynamicTransferBuffer();
ASSERT_EQ(0, pool.getNumUsedBlocks());
}