Hi Cris,
By using the same EntityManager (and maybe even the same transaction if your tx is started outside the loop) you are causing your persistence context to grow and keep all of the objects. 1000 objects is going to be a noticable piece of memory and inserting this number of entities is probably not a common scenario. Nevertheless, clearing or closing the EntityManager afterwards should cause most of the memory to be regained (modulo the shared cache if it is not disabled).
Another
test that you can try is to chunk the inserts, i.e. put an object persist inside a loop of 100 and nest that inside a loop of 10 iterations, creating a new EntityManager and transaction for each of the 10 iterations. Make sure that you either clear the EntityManager at the beginning of each of the 10 iterations, or close the old one and create a new one.
You should see that the memory is only increasing by the size of 100 objects at a time and, if the GC runs in a timely manner, you should see it drop again at each iteration.