imay commented on a change in pull request #3326: [LSAN] Fix some memory leak
detected by LSAN
URL: https://github.com/apache/incubator-doris/pull/3326#discussion_r409275162
##########
File path: be/src/exec/es/es_query_builder.cpp
##########
@@ -169,20 +170,16 @@ BooleanQueryBuilder::BooleanQueryBuilder() {
}
BooleanQueryBuilder::~BooleanQueryBuilder() {
for (auto clause : _must_clauses) {
- delete clause;
- clause = nullptr;
+ SAFE_DELETE(clause);
Review comment:
just delete is OK
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]