Skip to content

Commit

Permalink
explicitly destruct global root class
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Dorezyuk committed Apr 3, 2020
1 parent a784ac6 commit c6f04dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mbf_costmap_nav/src/move_base_server_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@ int main(int argc, char **argv)
#endif
costmap_nav_srv_ptr = boost::make_shared<mbf_costmap_nav::CostmapNavigationServer>(tf_listener_ptr);
ros::spin();

// explicitly desctructor here, otherwise this class will be destructed
// after tearing down internally allocaled static variables
costmap_nav_srv_ptr.reset();
return EXIT_SUCCESS;
}

0 comments on commit c6f04dd

Please sign in to comment.