fix px resource analyzer memory leak

This commit is contained in:
sdc
2024-03-04 07:44:25 +00:00
committed by ob-robot
parent 1c274523a3
commit 4e81697951
2 changed files with 4 additions and 5 deletions

View File

@ -185,7 +185,7 @@ int ObPxResourceAnalyzer::analyze(
}
for (int64_t i = 0; i < px_trees_.count(); ++i) {
if (OB_NOT_NULL(px_trees_.at(i))) {
px_trees_.at(i)->destroy();
px_trees_.at(i)->~PxInfo();
px_trees_.at(i) = NULL;
}
}

View File

@ -147,10 +147,6 @@ struct LogRuntimeFilterDependencyInfo
public:
LogRuntimeFilterDependencyInfo() : rf_create_ops_() {}
~LogRuntimeFilterDependencyInfo() = default;
void destroy()
{
rf_create_ops_.reset();
}
inline bool is_empty() const {
return rf_create_ops_.empty();
}
@ -174,6 +170,9 @@ struct PxInfo {
: inited_(false), root_op_(root_op), root_dfo_(root_dfo),
threads_cnt_(0), group_cnt_(0), rf_dpd_info_()
{}
~PxInfo() {
destroy();
}
void destroy()
{
if (OB_NOT_NULL(root_dfo_)) {