From bb004431db9eb68c1935064f19711f522a20a543 Mon Sep 17 00:00:00 2001 From: Jackie Tien Date: Sun, 26 Sep 2021 13:58:30 +0800 Subject: [PATCH] call the destructor while memcpy is not safe in the pop_back() function of ObSEArrayImpl (#319) --- deps/oblib/src/lib/container/ob_se_array.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deps/oblib/src/lib/container/ob_se_array.h b/deps/oblib/src/lib/container/ob_se_array.h index 4c03178b8f..23649eb99b 100644 --- a/deps/oblib/src/lib/container/ob_se_array.h +++ b/deps/oblib/src/lib/container/ob_se_array.h @@ -478,6 +478,9 @@ void ObSEArrayImpl::pop_back() { if (OB_UNLIKELY(count_ <= 0)) { } else { + if (!is_memcpy_safe()) { + data_[count_ - 1].~T(); + } --count_; } } -- GitLab