Open effad opened 4 years ago
The leak also occurs with JDK-1.8.0_202
I think the actual bug is in com.profesorfalken.wmi4java.WMIVBScript.executeScript(String)
.
By adding
process.getInputStream().close();
process.getOutputStream().close();
process.getErrorStream().close();
at the end of executeScript
the leak can be made smaller, but it does not disappear altogether.
By adding
process.getInputStream().close(); process.getOutputStream().close(); process.getErrorStream().close();
at the end of
executeScript
the leak can be made smaller, but it does not disappear altogether.
Yes it does disappear completely, but the Garbage Collector has to be run in order for the handles to be freed.
When running this code with Java 13 in Windows:
the number of open windows (file) handles will grow constantly.