diff --git a/orchagent/bufferorch.cpp b/orchagent/bufferorch.cpp index 42aae30247..db210d383c 100644 --- a/orchagent/bufferorch.cpp +++ b/orchagent/bufferorch.cpp @@ -31,12 +31,12 @@ static const vector bufferPoolWatermarkStatIds = }; type_map BufferOrch::m_buffer_type_maps = { - {APP_BUFFER_POOL_TABLE_NAME, new object_reference_map()}, - {APP_BUFFER_PROFILE_TABLE_NAME, new object_reference_map()}, - {APP_BUFFER_QUEUE_TABLE_NAME, new object_reference_map()}, - {APP_BUFFER_PG_TABLE_NAME, new object_reference_map()}, - {APP_BUFFER_PORT_INGRESS_PROFILE_LIST_NAME, new object_reference_map()}, - {APP_BUFFER_PORT_EGRESS_PROFILE_LIST_NAME, new object_reference_map()} + {APP_BUFFER_POOL_TABLE_NAME, make_shared()}, + {APP_BUFFER_PROFILE_TABLE_NAME, make_shared()}, + {APP_BUFFER_QUEUE_TABLE_NAME, make_shared()}, + {APP_BUFFER_PG_TABLE_NAME, make_shared()}, + {APP_BUFFER_PORT_INGRESS_PROFILE_LIST_NAME, make_shared()}, + {APP_BUFFER_PORT_EGRESS_PROFILE_LIST_NAME, make_shared()} }; map buffer_to_ref_table_map = { diff --git a/orchagent/orch.h b/orchagent/orch.h index bb39d34589..df8ab76f06 100644 --- a/orchagent/orch.h +++ b/orchagent/orch.h @@ -71,7 +71,7 @@ typedef struct } referenced_object; typedef std::map object_reference_map; -typedef std::map type_map; +typedef std::map> type_map; typedef std::map object_map; typedef std::pair object_map_pair; diff --git a/orchagent/qosorch.cpp b/orchagent/qosorch.cpp index c61885992e..233cb894c5 100644 --- a/orchagent/qosorch.cpp +++ b/orchagent/qosorch.cpp @@ -74,22 +74,22 @@ map scheduler_meter_map = { }; type_map QosOrch::m_qos_maps = { - {CFG_DSCP_TO_TC_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_MPLS_TC_TO_TC_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_DOT1P_TO_TC_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_TC_TO_QUEUE_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_SCHEDULER_TABLE_NAME, new object_reference_map()}, - {CFG_WRED_PROFILE_TABLE_NAME, new object_reference_map()}, - {CFG_PORT_QOS_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_QUEUE_TABLE_NAME, new object_reference_map()}, - {CFG_TC_TO_PRIORITY_GROUP_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_PFC_PRIORITY_TO_QUEUE_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_DSCP_TO_FC_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_EXP_TO_FC_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_TC_TO_DOT1P_MAP_TABLE_NAME, new object_reference_map()}, - {CFG_TC_TO_DSCP_MAP_TABLE_NAME, new object_reference_map()}, - {APP_TUNNEL_DECAP_TABLE_NAME, new object_reference_map()} + {CFG_DSCP_TO_TC_MAP_TABLE_NAME, make_shared()}, + {CFG_MPLS_TC_TO_TC_MAP_TABLE_NAME, make_shared()}, + {CFG_DOT1P_TO_TC_MAP_TABLE_NAME, make_shared()}, + {CFG_TC_TO_QUEUE_MAP_TABLE_NAME, make_shared()}, + {CFG_SCHEDULER_TABLE_NAME, make_shared()}, + {CFG_WRED_PROFILE_TABLE_NAME, make_shared()}, + {CFG_PORT_QOS_MAP_TABLE_NAME, make_shared()}, + {CFG_QUEUE_TABLE_NAME, make_shared()}, + {CFG_TC_TO_PRIORITY_GROUP_MAP_TABLE_NAME, make_shared()}, + {CFG_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE_NAME, make_shared()}, + {CFG_PFC_PRIORITY_TO_QUEUE_MAP_TABLE_NAME, make_shared()}, + {CFG_DSCP_TO_FC_MAP_TABLE_NAME, make_shared()}, + {CFG_EXP_TO_FC_MAP_TABLE_NAME, make_shared()}, + {CFG_TC_TO_DOT1P_MAP_TABLE_NAME, make_shared()}, + {CFG_TC_TO_DSCP_MAP_TABLE_NAME, make_shared()}, + {APP_TUNNEL_DECAP_TABLE_NAME, make_shared()} }; map qos_to_ref_table_map = {