to issue<48587285>:fix memory leak about pl collection shrink
This commit is contained in:
parent
d2110be61c
commit
f9b0da4444
@ -74,6 +74,16 @@ int ObPLAllocator::shrink()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObPLCollAllocator::free_child_coll(ObPLCollection &dest)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < dest.get_count(); ++i) {
|
||||
OZ (ObUserDefinedType::destruct_obj(dest.get_data()[i], NULL));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObPLCollAllocator::copy_all_element_with_new_allocator(ObIAllocator *allocator)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
ObPLAllocator(), coll_(coll) {}
|
||||
|
||||
virtual int copy_all_element_with_new_allocator(ObIAllocator *allocator) override;
|
||||
static int free_child_coll(ObPLCollection &dest);
|
||||
|
||||
private:
|
||||
ObPLCollection* coll_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user