diff --git a/datamgr_service/services/distributeddataservice/service/rdb/rdb_cloud.h b/datamgr_service/services/distributeddataservice/service/rdb/rdb_cloud.h index 0579853f352e22ee032df0ba1e15806760a8021b..2b532e02f589fd22c895296550676d606f2b8a9c 100644 --- a/datamgr_service/services/distributeddataservice/service/rdb/rdb_cloud.h +++ b/datamgr_service/services/distributeddataservice/service/rdb/rdb_cloud.h @@ -27,7 +27,7 @@ public: using DBVBucket = DistributedDB::VBucket; explicit RdbCloud(std::shared_ptr cloudDB); - ~RdbCloud() = default; + virtual ~RdbCloud() = default; DBStatus BatchInsert(const std::string &tableName, std::vector &&record, std::vector &extend) override; DBStatus BatchUpdate(const std::string &tableName, std::vector &&record, diff --git a/datamgr_service/services/distributeddataservice/service/rdb/rdb_general_store.cpp b/datamgr_service/services/distributeddataservice/service/rdb/rdb_general_store.cpp index 696e0dd4d09c74351b62619c67c0213d634e99b5..1d162e7ff17e7e3b9130a825cc1c64e519a11bb3 100644 --- a/datamgr_service/services/distributeddataservice/service/rdb/rdb_general_store.cpp +++ b/datamgr_service/services/distributeddataservice/service/rdb/rdb_general_store.cpp @@ -84,6 +84,7 @@ RdbGeneralStore::~RdbGeneralStore() bindInfo_.loader_ = nullptr; bindInfo_.db_->Close(); bindInfo_.db_ = nullptr; + rdbCloud_ = nullptr; } int32_t RdbGeneralStore::Bind(const Database &database, BindInfo bindInfo)