improved the code about the object returning of object pool