finalize GraphGridProvider with DFS