Fix HtmlUnit Memory Leak

The Problem While testing pages with heavy JavaScript usage in HtmlUnit, great amounts of heap memory are allocated but never released. Solutions There are numerous solutions, which can be applied to fix an OutOfMemory error related to HtmlUnit: Call webClient.closeAllWindows(); The first often suggested remedy to fix a HtmlUnit memory leak is to call webClient.closeAllWindows() … Continue reading Fix HtmlUnit Memory Leak