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()
|
cEncoder::~cEncoder()
|
||||||
{
|
{
|
||||||
|
sack_type::iterator itr;
|
||||||
|
for( itr = m_encodings.begin(); itr != m_encodings.end(); ++itr)
|
||||||
|
delete *itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cEncoder::RoundTrip() const
|
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) {
|
if (mustfree) {
|
||||||
mustfree = 0;
|
mustfree = 0;
|
||||||
delete(yytext);
|
delete [] yytext;
|
||||||
delete(state);
|
delete [] state;
|
||||||
#ifdef YY_PRESERVE
|
#ifdef YY_PRESERVE
|
||||||
delete(save);
|
delete [] save;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,12 +419,12 @@ yy_parse::yy_parse(int sz)
|
||||||
yy_parse::~yy_parse()
|
yy_parse::~yy_parse()
|
||||||
{
|
{
|
||||||
if (mustfree) {
|
if (mustfree) {
|
||||||
delete stateStack;
|
delete [] stateStack;
|
||||||
delete valueStack;
|
delete [] valueStack;
|
||||||
}
|
}
|
||||||
stateStack = (short *) 0;
|
stateStack = (short *) 0;
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
delete typeStack;
|
delete [] typeStack;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ cRefCountTestObj::~cRefCountTestObj()
|
||||||
mChildren.pop_front();
|
mChildren.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete mpSomeMem;
|
delete [] mpSomeMem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRefCountTestObj::AddChild(cRefCountTestObj* pChild)
|
void cRefCountTestObj::AddChild(cRefCountTestObj* pChild)
|
||||||
|
|
Loading…
Reference in New Issue