fix: memory leak in task pool management when request is processed