You have to destroy the pool after the loop, not inside the loop.