diff --git a/examples/column_families_example.cc b/examples/column_families_example.cc index df936d46a..0012e9dc1 100644 --- a/examples/column_families_example.cc +++ b/examples/column_families_example.cc @@ -28,7 +28,8 @@ int main() { assert(s.ok()); // close DB - delete cf; + s = db->DestroyColumnFamilyHandle(cf); + assert(s.ok()); delete db; // open DB with two column families @@ -64,7 +65,8 @@ int main() { // close db for (auto handle : handles) { - delete handle; + s = db->DestroyColumnFamilyHandle(handle); + assert(s.ok()); } delete db;