What is allocated with 're2c::allocate<T>' (operator new), should
be freed with 'operator delete', not with 'delete' or 'delete []'.
if (nSpans < s->go.nSpans)
{
- delete [] s->go.span;
+ operator delete (s->go.span);
s->go.nSpans = nSpans;
s->go.span = allocate<Span> (nSpans);
memcpy(s->go.span, span, nSpans*sizeof(Span));
}
}
- delete [] span;
+ operator delete (span);
}
void DFA::prepare(uint32_t & max_fill)
lgo = bSpans == 0
? NULL
: new SwitchIf (bspan, bSpans, next);
- delete [] bspan;
+ operator delete (bspan);
}
const uint32_t CpgotoTable::TABLE_SIZE = 0x100;
Skeleton::~Skeleton ()
{
- delete [] nodes;
+ operator delete (nodes);
}
void Skeleton::generate_paths (std::vector<Path> & results)
CharSet::~CharSet()
{
- delete[] rep;
- delete[] ptn;
+ operator delete (rep);
+ operator delete (ptn);
}
smart_ptr<DFA> genCode(RegExp *re, Output & output, uint32_t ind)
delete [] work;
delete [] goTo;
- delete [] span;
+ operator delete (span);
}
DFA::~DFA()
{
delete action;
delete [] kernel;
- delete [] go.span;
+ operator delete (go.span);
}
std::ostream & operator << (std::ostream & o, const State & s)