You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/04/06 14:28:20 UTC
[incubator-doris] branch master updated: [Refactor] refactor the
destructor in olap_meta.cpp (#5563)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new bef2904 [Refactor] refactor the destructor in olap_meta.cpp (#5563)
bef2904 is described below
commit bef2904f285bb396860d6e29fd8e196f2440b15f
Author: weizuo93 <68...@users.noreply.github.com>
AuthorDate: Tue Apr 6 22:28:04 2021 +0800
[Refactor] refactor the destructor in olap_meta.cpp (#5563)
---
be/src/olap/olap_meta.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/be/src/olap/olap_meta.cpp b/be/src/olap/olap_meta.cpp
index dcc0fae..73237e2 100644
--- a/be/src/olap/olap_meta.cpp
+++ b/be/src/olap/olap_meta.cpp
@@ -48,11 +48,11 @@ const size_t PREFIX_LENGTH = 4;
OlapMeta::OlapMeta(const std::string& root_path) : _root_path(root_path), _db(nullptr) {}
OlapMeta::~OlapMeta() {
- for (auto handle : _handles) {
- _db->DestroyColumnFamilyHandle(handle);
- handle = nullptr;
- }
if (_db != nullptr) {
+ for (auto& handle : _handles) {
+ _db->DestroyColumnFamilyHandle(handle);
+ handle = nullptr;
+ }
delete _db;
_db = nullptr;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org