Removing memory leak in kNeighbor benchmark