Open Pterosaur opened 1 week ago
An executor was added into the m_comsumerMap, but this executor's pointer will not be released in the destructor of Orch. The lifetime of executor is ambiguous.
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/portsorch.cpp#L707
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/orch.cpp#L794-L799
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/orch.h#L226
Maybe to use a shared pointer to manage the executor is better.
An executor was added into the m_comsumerMap, but this executor's pointer will not be released in the destructor of Orch. The lifetime of executor is ambiguous.
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/portsorch.cpp#L707
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/orch.cpp#L794-L799
https://github.com/sonic-net/sonic-swss/blob/e8d81b44bbfebb741468b86371364df2b1c8c0d5/orchagent/orch.h#L226