Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix #417, memory leak of expanded keyword
- Loading branch information
Showing
with
3 additions
and
5 deletions.
-
+3
−5
src/sphinxint.h
|
@@ -1968,9 +1968,7 @@ struct SphExpanded_t |
|
|
|
|
|
struct ISphSubstringPayload |
|
|
{ |
|
|
// neither of derivatives uses dynamic data and d-trs. |
|
|
// virtual ~ISphSubstringPayload() {} |
|
|
|
|
|
virtual ~ISphSubstringPayload() {} |
|
|
int m_iTotalDocs = 0; |
|
|
int m_iTotalHits = 0; |
|
|
}; |
|
@@ -2112,8 +2110,8 @@ class CSphScopedPayload |
|
|
CSphScopedPayload () {} |
|
|
~CSphScopedPayload () |
|
|
{ |
|
|
ARRAY_FOREACH ( i, m_dPayloads ) |
|
|
SafeDelete ( m_dPayloads[i] ); |
|
|
for ( auto & dPayload : m_dPayloads ) |
|
|
SafeDelete ( dPayload ); |
|
|
} |
|
|
void Add ( ISphSubstringPayload * pPayload ) { m_dPayloads.Add ( pPayload ); } |
|
|
|
|
|