I opened the chrome browser under my windows computer, and did the following operations :
- (1) Open a chrome new tab (marked as Tab1) with a link address such as
https://v3demo.mediasoup.org/?roomId=atptze2k
- (2) Then, open another chrome tab (marked as Tab2) with the same link address
https://v3demo.mediasoup.org/?roomId=atptze2k
.
Entering the same room atptze2k - (3) Close tab2, redo the above step (2), open another tab2
- (4) Repeat the above two steps (2), (3)
Then I found the memory of tab1 continues to grow from 170m to 200m. After about 8 hours later, the consumed memory reached more than 600m. It is conceivable that if this operation continues, the memory will continue to grow.
Next, I opened chrome://webrtc-internal
and clicked second address tab. And I found that when a peer entered the room it will increase two googTracks every time. But the googTracks will not release after peer exited the room. This maybe the cause of chrome memory leak.
Why did googTracks not be released when a peer exited the room in which mediasoup-client api such as consume.close()
or (recv)transport.close()
would be invoked? It’s annoying, please tell me how to solve this problem.