Global time-based timer are not canceled
in #55 (closed) @puzzler reported memory out when creating many Sat4j solvers with a model iterator.
After investigation, the issue is that the model iterator enforces a global timeout in the solver. In that case, the internal Timer object is never canceled, which prevents Sat4j objects to be garbage collected.
The workaround is to use a conflict based timeout in that case.
To prevent similar issue in the future, we could:
- use a conflict-based timer by default
- do not force global timeout for model iterator
- ...
The issue requires further investigation.