Add object pool mechanism for task objects