title: Memory Leak: JavaScript - passing array buffer to Web Worker using transferable object, GC doesn't kick in
body: <p>So, I am passing video buffer(Float32Array buffer) to worker thread as a transferable object, it happens for each frame of the video(meaning, continuously video frames are being passed to worker). I did memory profiling, and worker thread is retaining the object, it seems garbage collector doesn't kick in. How to handle this case? I don't think one can invoke GC explicitly in JavaScript.</p>
  <p>Here is the code snippet how I am passing video buffer to worker thread:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>this.worker.postMessage({
            command: 'SetVideoBuffer',
            data: {
              videoFrame: videoFrame
            }
          },
            [videoFrame.buffer]);</code></pre>
  </div>
  </div>
  </p>
  <p>Also, I tried setting the buffer at worker side to 'null', it didn't help.</p>
  <p>Any idea how to resolve this, is this chrome thing? Please help.</p>
  <p>Thank you!</p>