[src] fixed memory leak due to missing pool.terminate/pool.close