I am using jxbrowser to make an automation test application.
After run a lot of automation tests(login to a webpage, click some button, perform some UI interaction), I reallize that the jxbroser-chromium.exe took so huge RAM, Even after doing some automation tests, I load "about:blank" page
Note that I use only one instance of Browser & BrowserView
Is there any way to clean & clear RAM when using jxbrowser?
JxBrowser is based on Chromium engine. Chromium engine is running in the jxbrowser-chromium.exe process. JxBrowser doesn't control the memory in this process. All memory management is done by Chromium engine. If you see that the process allocates too much memory, then it means that Chromium engine decided to allocate this amount of memory for some reasons.
I believe if you do the same automated tests in Google Chrome tab, you will see the same memory usage issue. As far as I know there's no Chromium API that would clear the memory of an existing tab/browser. To clear the memory I can only suggest that you dispose Browser instance and create it again.
来源:https://stackoverflow.com/questions/39246831/jxbrowser-takes-huge-ram