Use smart pointer for RoadGraph.