Fix low hanging fruit items from valgrind memcheck results, mostly array deletes
This commit is contained in:
parent
8cec86246f
commit
b3bcdbbcd9
|
@ -653,6 +653,9 @@ cEncoder::cEncoder( int e, int f )
|
|||
|
||||
cEncoder::~cEncoder()
|
||||
{
|
||||
sack_type::iterator itr;
|
||||
for( itr = m_encodings.begin(); itr != m_encodings.end(); ++itr)
|
||||
delete *itr;
|
||||
}
|
||||
|
||||
bool cEncoder::RoundTrip() const
|
||||
|
|
|
@ -316,6 +316,7 @@ cHashTable<KEY_TYPE, VAL_TYPE, COMPARE_OP, CONVERTER>::~cHashTable()
|
|||
}
|
||||
}
|
||||
}
|
||||
delete [] mTable;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -614,10 +614,10 @@ yy_scan::~yy_scan()
|
|||
{
|
||||
if (mustfree) {
|
||||
mustfree = 0;
|
||||
delete(yytext);
|
||||
delete(state);
|
||||
delete [] yytext;
|
||||
delete [] state;
|
||||
#ifdef YY_PRESERVE
|
||||
delete(save);
|
||||
delete [] save;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -419,12 +419,12 @@ yy_parse::yy_parse(int sz)
|
|||
yy_parse::~yy_parse()
|
||||
{
|
||||
if (mustfree) {
|
||||
delete stateStack;
|
||||
delete valueStack;
|
||||
delete [] stateStack;
|
||||
delete [] valueStack;
|
||||
}
|
||||
stateStack = (short *) 0;
|
||||
#if YYDEBUG
|
||||
delete typeStack;
|
||||
delete [] typeStack;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ cRefCountTestObj::~cRefCountTestObj()
|
|||
mChildren.pop_front();
|
||||
}
|
||||
|
||||
delete mpSomeMem;
|
||||
delete [] mpSomeMem;
|
||||
}
|
||||
|
||||
void cRefCountTestObj::AddChild(cRefCountTestObj* pChild)
|
||||
|
|
Loading…
Reference in New Issue