videojs-record icon indicating copy to clipboard operation
videojs-record copied to clipboard

audio-only: memory not released after destroy

Open ignl opened this issue 4 years ago • 4 comments

Description

During navigation I destroy wavesurfer player with microphone plugin, but it seems memory is not exactly freed and slowly increasing by creating/destroying player. 1 2

Versions

Make sure to include the following versions:

videojs/wavesurfer

Video.js: 7.11.4 Video.js wavesurver: 3.3.1 wavesurfer.js: 4.4.0 videojs-record: 4.2.0

google chrome 88 on kubuntu 20.10

ignl avatar Mar 03 '21 12:03 ignl

thanks for the report. A memory issue was resolved in wavesurfer.js 4.5.0, can you give that a try @ignl?

thijstriemstra avatar Mar 03 '21 12:03 thijstriemstra

Yes, it's the same thing with new version as well. It seems that videojs wavesurfer plugin still holds reference to videojs player through some handlers(?) that are not cleared. Not sure haven't checked the code myself yet, maybe you might know right away.

ignl avatar Mar 03 '21 14:03 ignl

can you attach a small example that reproduces the issue? Also, please include operating/system browser information.

thijstriemstra avatar Mar 03 '21 14:03 thijstriemstra

I have tried first to modify regular videojs-wavesurfer plugin audio example and it seems it works OK. However in my example I used wavesurfer plugin with audio recorder and after adding that into example memory leak is visible clearly when pressing init/destroy buttons and doing allocation instrumentation (Memory tab in google chrome dev tools). I use google chrome 88 on kubuntu 20.10. It seems some handlers are not cleared, but since it's related to recorder maybe the problem is there... example.zip

ignl avatar Mar 03 '21 17:03 ignl