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

@@ -41,7 +41,7 @@
// DATA //
// //
//===================================================//
char version[]="WebView 3.04";
char version[]="WebView 3.06";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
@@ -231,10 +231,12 @@ void main()
if (http_get_type==PAGE) {
history.add(http.cur_url);
cache.add(http.cur_url, http.content_pointer, http.content_received, PAGE);
LoadInternalPage(http.content_pointer, http.content_received);
free(http.content_pointer);
LoadInternalPage(cache.current_buf, cache.current_size);
}
else if (http_get_type==IMG) {
cache.add(cur_img_url, http.content_pointer, http.content_received, IMG);
free(http.content_pointer);
GetImg(false);
}
}