Eliminate dynamic memory in editor BFS drawing