collab-project / videojs-record

video.js plugin for recording audio/video/image files
https://collab-project.github.io/videojs-record
MIT License
1.4k stars 317 forks source link

audio-only: memory not released after destroy #557

Open ignl opened 3 years ago

ignl commented 3 years ago

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

thijstriemstra commented 3 years ago

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

ignl commented 3 years ago

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.

thijstriemstra commented 3 years ago

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

ignl commented 3 years ago

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