diff --git a/src/core/CLucene/search/ConstantScoreQuery.cpp b/src/core/CLucene/search/ConstantScoreQuery.cpp
index fca306f..98cda26 100644
--- a/src/core/CLucene/search/ConstantScoreQuery.cpp
+++ b/src/core/CLucene/search/ConstantScoreQuery.cpp
@@ -25,14 +25,17 @@ class ConstantScorer : public Scorer {
     BitSet* bits;
     const float_t theScore;
     int32_t _doc;
+    bool shouldDelete;
 
 public:
     ConstantScorer(Similarity* similarity, IndexReader* reader, Weight* w, Filter* filter) : Scorer(similarity),
         bits(filter->bits(reader)), theScore(w->getValue()), _doc(-1)
     {
+        shouldDelete = filter->shouldDeleteBitSet(bits);
     }
     virtual ~ConstantScorer() {
-        _CLLDELETE(bits);
+        if ( shouldDelete)
+            _CLLDELETE(bits);
     }
 
     bool next() {
