prevent garbage collection in a batch
now a batch has a copy of the term it is using, this is preventing any garbage collection of the term before we actually writing them.
some notes about that change:
- when writing the batch, the env and its content is cleared.
- clearing a batch also release the terms
- when the resource is garbage collected all the terms are also released and the batch env is freed.
Edited by benoît chesneau