Hi,
I think the generated scanner leaks some memory. I was able to fix this by defining an onDestroy method in the syntax file in the code section of the scanner as follows:
void onDestroy() { delete[] _buffer; t_laCell *p = (_laEnd ? _laEnd->next : 0); while (p && (p != _laEnd)) { t_laCell *q = p->next; delete p; p = q; } delete _laEnd; }
This couuld probably be improved but it seems to work for me.
Thanks for a great product!
That's right, i seem to have completely forgot about that bit. It's fixed in 0.0.6
Thanks for spotting it, Alec.
Log in to post a comment.
Hi,
I think the generated scanner leaks some
memory. I was able to fix this by defining an
onDestroy method in the syntax file in the code
section of the scanner as follows:
void onDestroy()
{
delete[] _buffer;
t_laCell *p = (_laEnd ? _laEnd->next : 0);
while (p && (p != _laEnd))
{
t_laCell *q = p->next;
delete p;
p = q;
}
delete _laEnd;
}
This couuld probably be improved but it seems
to work for me.
Thanks for a great product!
Hi,
That's right, i seem to have completely forgot about that bit. It's fixed in 0.0.6
Thanks for spotting it,
Alec.