call the destructor while memcpy is not safe in the pop_back() function of ObSEArrayImpl (#319)

This commit is contained in:
Jackie Tien
2021-09-26 13:58:30 +08:00
committed by GitHub
parent 16b086a718
commit bb004431db

View File

@ -478,6 +478,9 @@ void ObSEArrayImpl<T, LOCAL_ARRAY_SIZE, BlockAllocatorT, auto_free>::pop_back()
{ {
if (OB_UNLIKELY(count_ <= 0)) { if (OB_UNLIKELY(count_ <= 0)) {
} else { } else {
if (!is_memcpy_safe()) {
data_[count_ - 1].~T();
}
--count_; --count_;
} }
} }