Valgrind reports that <ol>s leak the labels of their items: each of
the first 9 <li>s leaks 3 bytes, then they leak 4 bytes per <li> etc.
The leaked memory is created by the line
list_item->initWithText (dStrdup(buf), wordStyle);
in Html_tag_open_li (in src/html.cc). The dStrdup()ed memory is never
freed. I think that the problem is that the TextBlock destructor only
deletes the content of a word if the content type is WIDGET or ANCHOR,
whereas it should also handle the case when the content type is TEXT.
Perhaps initWithText() should copy the string argument itself with
new[] so that ~TextBlock could safely delete[] it? The only two
references to initWithText() are in html.cc and one of the widget
tests, so this would be an easy change.
Regards,
Jeremy Henty