Hi everyone,
I have a question about resource cleanup in mediasoup.
When removing a Transport, Producer, or Consumer, is calling .close() enough, or is it also recommended to call .removeAllListeners()?
For example:
producer.close();
producer.removeAllListeners();
and similarly for transports and consumers.
My understanding is that .close() should emit the appropriate events and release mediasoup resources, but I’m not sure whether manually calling .removeAllListeners() is considered best practice to avoid potential memory leaks, especially in long-running applications.
What is the recommended cleanup pattern in production applications?
Thanks!