Menu

#192 Resource leak PhraseQuery

open-out-of-date
core (32)
5
2011-02-14
2010-11-30
No

Code analyser tool runned against QT including CLucene reveiled CTOR_DTOR_LEAK in FSDirectory::FSIndexInput::SharedHandle::~SharedHandle()
Fix proposal:
diff --git a/src/3rdparty/clucene/src/CLucene/search/PhraseQuery.cpp b/src/3rdparty/clucene/src/CLucene/search/PhraseQuery.cpp
index 899cb3c..566904f 100644
--- a/src/3rdparty/clucene/src/CLucene/search/PhraseQuery.cpp
+++ b/src/3rdparty/clucene/src/CLucene/search/PhraseQuery.cpp
@@ -418,6 +418,8 @@ CL_NS_DEF(search)
queryNormExpl->getValue());

result->addDetail(queryExpl);
+ if (_this->getBoost() == 1.0f)
+ _CLDELETE(boostExpl);

// explain field weight
Explanation* fieldExpl = _CLNEW Explanation;

Discussion

  • Itamar Syn-Hershko

    • assigned_to: nobody --> idolum
     
  • Veit Jahns

    Veit Jahns - 2011-02-10
    • status: open --> open-accepted
     
  • Veit Jahns

    Veit Jahns - 2011-02-10
    • labels: --> core
     
  • Veit Jahns

    Veit Jahns - 2011-02-14
    • status: open-accepted --> open-out-of-date
     
  • Veit Jahns

    Veit Jahns - 2011-02-14

    This bug refers to v0.9.21. In the current master branch this issue was fixed already. See commit f495897b.

     

Log in to post a comment.