WebView: fixed memory leak in cache.add(), give system memory back each time parse ends

git-svn-id: svn://kolibrios.org@8425 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2020-12-16 16:30:39 +00:00
parent 7f757d3058
commit 6cb7bf1eb6
6 changed files with 19 additions and 17 deletions

View File

@@ -304,6 +304,11 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
Paint();
NewLine();
list.count = draw_y;
DrawBuf.bufh = math.max(list.visible, draw_y);
debugval("DrawBuf.bufh", DrawBuf.bufh);
buf_data = realloc(buf_data, DrawBuf.bufh * DrawBuf.bufw * 4 + 8);
list.CheckDoesValuesOkey();
anchors.current = NULL;
custom_encoding = -1;