You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4043 Fix memory leaks - 2
Perform deletes of Compare objects in the OrderByData dtor, which were allocated by CompareRule::compileRules().
This commit is contained in:
@ -693,6 +693,24 @@ OrderByData::OrderByData(const std::vector<IdbSortSpec>& spec, const rowgroup::R
|
||||
}
|
||||
|
||||
|
||||
// OrderByData class dtor
|
||||
OrderByData::~OrderByData()
|
||||
{
|
||||
// delete compare objects
|
||||
vector<Compare*>::iterator i = fRule.fCompares.begin();
|
||||
|
||||
while (i != fRule.fCompares.end())
|
||||
{
|
||||
if (*i)
|
||||
{
|
||||
delete *i;
|
||||
*i = NULL;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// IdbOrderBy class implementation
|
||||
IdbOrderBy::IdbOrderBy() :
|
||||
fDistinct(false), fMemSize(0), fRowsPerRG(rowgroup::rgCommonSize),
|
||||
|
Reference in New Issue
Block a user