Hi, I see mediasoup c++ worker kept using memory even after closing the router with router.close.
So I create one router on one worker on one cpu, then create meeting with some participant(~30-40) I see ram usages go up to ~600 MBs then all participant left and router got closed. but I can see that mediasoup worker is still taking the same amount of memory.
Double check this, the router.close() if not mistaken only fires the event transportclose and routerclose; and if you aren’t clearing the transports it’d definitely be why you have left over ram. I could be wrong but I recall having this issue before and clean-up was required on my end.
No, it sends a ‘router.close’ message to the worker, and the worker calls the router’s destructor, which deletes all related objects. Everything is pretty straightforward there.
well I am sure that I close all the producer, consumer, transports before closing router. But router.close request destruct the router which destruct the transport available in the map of router instance and then destruct transport which destruct all producer and consumer inside the transport.