Permalink
Browse files

Fix #417, memory leak of expanded keyword

  • Loading branch information...
klirichek committed Aug 24, 2018
1 parent 30c75a2 commit 08c9507177820f441f534bf06a11dac5e54bebb4
Showing with 3 additions and 5 deletions.
  1. +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 ); }

0 comments on commit 08c9507

Please sign in to comment.