diff --git a/Server/DataStructures/SharedDataFacade.h b/Server/DataStructures/SharedDataFacade.h index cdec82fc3..9ce00f744 100644 --- a/Server/DataStructures/SharedDataFacade.h +++ b/Server/DataStructures/SharedDataFacade.h @@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../../DataStructures/StaticRTree.h" #include "../../Util/BoostFileSystemFix.h" #include "../../Util/ProgramOptions.h" +#include "../../Util/make_unique.hpp" #include "../../Util/simple_logger.hpp" #include @@ -68,9 +69,9 @@ template class SharedDataFacade : public BaseDataFacade m_query_graph; - std::shared_ptr m_layout_memory; - std::shared_ptr m_large_memory; + std::unique_ptr m_query_graph; + std::unique_ptr m_layout_memory; + std::unique_ptr m_large_memory; std::string m_timestamp; std::shared_ptr::vector> m_coordinate_list; @@ -113,7 +114,7 @@ template class SharedDataFacade : public BaseDataFacadeGetBlockPtr(shared_memory, SharedDataLayout::R_SEARCH_TREE); m_static_rtree.reset(new TimeStampedRTreePair(CURRENT_TIMESTAMP, - std::make_shared( + osrm::make_unique( tree_ptr, data_layout->num_entries[SharedDataLayout::R_SEARCH_TREE], file_index_path, @@ -140,7 +141,7 @@ template class SharedDataFacade : public BaseDataFacadeGetBlockPtr( shared_memory, SharedDataLayout::COORDINATE_LIST); - m_coordinate_list = std::make_shared::vector>( + m_coordinate_list = osrm::make_unique::vector>( coordinate_list_ptr, data_layout->num_entries[SharedDataLayout::COORDINATE_LIST]); TravelMode *travel_mode_list_ptr = data_layout->GetBlockPtr( @@ -188,7 +189,7 @@ template class SharedDataFacade : public BaseDataFacadeGetBlockPtr(shared_memory, SharedDataLayout::NAME_CHAR_LIST); typename ShM::vector names_char_list( names_list_ptr, data_layout->num_entries[SharedDataLayout::NAME_CHAR_LIST]); - m_name_table = std::make_shared>( + m_name_table = osrm::make_unique>( name_offsets, name_blocks, names_char_list.size()); m_names_char_list.swap(names_char_list);