aruntj / mjpeg-readable-stream

Code to read an Mjpeg stream using the Readable stream api.
MIT License
53 stars 13 forks source link

Fix memory leak #4

Closed gastmaier closed 2 years ago

gastmaier commented 2 years ago

The code memory leaked a lot due to caching the stream. This patch fixes that by revoking the ObjectURL. It also moves the querySelector outside the loop since the target does not change. Tested on Firefox only.

aruntj commented 2 years ago

Wow nice fix, Thank you very much