use pool to optimize temp objects
fix close bug