Description
This function has to be called if the iteration is ended prematurely.
Otherwise tables are left open.
If the iteration is done until the end, terminate does not
need to be called, but it does not harm to call it.
Hereafter it is still possible to restart the iteration using the
reset function.