This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch clucene-2.0
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene-2.0 by this push:
new 5fdeed2a16 [Fix](index compaction) fix memory leak for index
compaction (#224) (#226)
5fdeed2a16 is described below
commit 5fdeed2a166a3325a0e05beb986889751b9acb45
Author: airborne12 <[email protected]>
AuthorDate: Wed Jun 19 11:49:29 2024 +0800
[Fix](index compaction) fix memory leak for index compaction (#224) (#226)
---
src/core/CLucene/index/IndexWriter.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/CLucene/index/IndexWriter.cpp
b/src/core/CLucene/index/IndexWriter.cpp
index 8bc3a93455..a3b30848af 100644
--- a/src/core/CLucene/index/IndexWriter.cpp
+++ b/src/core/CLucene/index/IndexWriter.cpp
@@ -45,7 +45,10 @@
#define FINALLY_CLOSE_OUTPUT(x) \
try { \
- if (x != nullptr) x->close(); \
+ if (x != nullptr) { \
+ x->close(); \
+ _CLDELETE(x) \
+ } \
} catch (...) { \
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]