# Web Video SDK 2.4.0 — Memory leak (~70 MB per session) after destroyClient(); orphaned "vb\_worker" created without Virtual Background

**URL:** <https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [September 3, 2026, 10:45am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168 "2026-09-03T10:45:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [September 3, 2026, 10:45am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/1 "2026-09-03T10:45:20Z")

</div>

### Description

We run a long-lived kiosk, which suffice sequential 1:1 sessions on a single page (the page is not reloaded between sessions). For each session, we create a client, initialize, join, start audio/video, and at session end we detach everything, call `leave()`, and `await ZoomVideo.destroyClient()`.

The renderer never returns to its pre-session memory footprint. Every completed session leaves ~70–80 MB of JS heap behind in SDK-created contexts. Over time, memory accumulates linearly and is never reclaimed by idle time (observed for 2-3 hours atleast) or forced GC.

We have two primary questions:

1. **What is the supported way to release it at session end?** `destroyClient()` does not clean it up, and we haven’t found a public API that does. There are 2 things left post call end one is ‘call’ which is around 22 MB or more and ‘vb\_worker’ which is around 48-50 MB.
2. **Why is a worker named `vb_worker` created per client when Virtual Background is never used?** No VB option is passed to `startVideo`, no background image is set, and VB APIs aren’t called anywhere in our code. Yet a TF.js worker named `vb_worker` (~50 MB, containing a selfie-segmentation model) is spawned on the first join of every client, with a new one accumulating for every session.

* * *

### Browser Console Error

There is no error, and no warning during teardown—`destroyClient()` resolves successfully without logging anything.

### **Which Web Video SDK version?**

**2.4.0** (We also statically inspected the 2.5.0 bundle; the relevant teardown logic appears identical).

### **Video SDK Code Snippets**

The trimmed-down per-session lifecycle (SDK calls only):

```auto
import ZoomVideo from '@zoom/videosdk'

// --- 1. Setup ---
const client = ZoomVideo.createClient()
ZoomVideo.preloadDependentAssets()

await client.init('en-US', 'CDN', { stayAwake: true, leaveOnPageUnload: true })
await client.join(topic, signature, userName)

const stream = client.getMediaStream()
await stream.startAudio()
await stream.startVideo({ hd: true })
await stream.attachVideo(remoteUserId, VideoQuality.Video_720P)

// --- 2. Teardown ---
const players = await stream.detachVideo(remoteUserId)
players.forEach((el) => el.remove())

await stream.stopVideo()
await stream.stopAudio()
await client.leave()
await ZoomVideo.destroyClient()

// The renderer stays on this page, and the next session repeats this block.

```

### **Screenshots**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/e/ee295051b641d6bec56011622f49c6f3ad0d95c5.png)

### **Device**

- **Device:** Desktop PC (x64)

- **OS:** Windows 11

- **Browser Version:** Chromium `140.0.7339.133`

### Additional context

Questions we are hoping to get answered:

1. Looking at the cleanup lifecycle: after `destroyClient()` runs, do you think doing a full reload is the safest route to guarantee all resources and singletons are fully wiped, or is there a preferred pattern you usually like to follow for post-destroy states?

2. Is `vb_worker` expected to boot on the WebRTC video path even when Virtual Background features are never requested?

3. Is there a public or supported API method to release these worker/worklet contexts during session teardown?

4. Is there an account or session flag to disable WebRTC video redirection if it isn’t required for our implementation?

5. Would enabling `patchJsMedia: true` allow a remote media-layer patch for this if one becomes available?

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [September 4, 2026, 7:07am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/2 "2026-09-04T07:07:16Z")

</div>

@vic.yang if possible, can you please look into this ?

---

<div class="post-metadata">

**Author:** ![ticorrian.heard](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ticorrian.heard/32/70213_2.png) [@ticorrian.heard](https://devforum.zoom.us/u/ticorrian.heard)\
**Post date:** [September 9, 2026, 8:24pm UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/3 "2026-09-09T20:24:14Z")

</div>

Hi @meet-jeavio let me reach out to our video sdk team to get you some assistance here. Thanks for your patience!

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [September 10, 2026, 8:55am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/4 "2026-09-10T08:55:44Z")

</div>

Hello @ticorrian.heard , Thanks for acknowledgement !

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 14, 2026, 6:21am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/5 "2026-09-14T06:21:47Z")

</div>

Hi @meet-jeavio

Thanks for your feedback.

We have identified the root cause and will fix it in the next release (v2.6.0).

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [September 14, 2026, 6:58am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/6 "2026-09-14T06:58:48Z")

</div>

Thanks @vic.yang, Appreciate the update !

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [November 5, 2026, 7:27am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/7 "2026-11-05T07:27:31Z")

</div>

Hello @vic.yang,

Thanks for the fix. I re-tested on **Web Video SDK 2.6.0** with the same setup as my original post (`leave()` followed by `ZoomVideo.destroyClient()`, no page reload between sessions and same configurations).

- **vb\_worker:** fixed. It no longer appears after teardown.
- **“call” context:** still left in memory after every session, about **20-22 MB per call**. This isn’t reclaimed by idle time (waited for 30 mins post call have seen like 15-20% of reclaim) or forced GC, and it builds up fastest with short back-to-back calls.

Could you check:

1. Is the “call” residue a known issue, and is a fix planned?
2. Until then, is there a supported way to release it at session end, or is a page reload the recommended workaround?

Thanks,  
Meet

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [November 5, 2026, 10:21am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/8 "2026-11-05T10:21:02Z")

</div>

Hi @meet-jeavio

Thanks for your feedback.

> 1. Is the “call” residue a known issue, and is a fix planned?

In our [sample app](https://github.com/zoom/videosdk-web-sample/), we don’t have a “call” context, only “Main.” Across multiple tests, Main’s memory returns to its pre-join level after leaving the session.

Could you confirm whether your page runs inside an iframe? Also, is there any uncleaned DOM or potential memory leak that could cause memory growth?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [November 5, 2026, 2:05pm UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/9 "2026-11-05T14:05:44Z")

</div>

The app doesn’t run inside an iframe. Also I have checked for other potential memory leaks / DOM clean up. I am certain about this, I’ll still double check and compare in again with the sample app observation. In the meantime can you think of anything else impacting this other than iframe ?

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [November 16, 2026, 2:20pm UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/10 "2026-11-16T14:20:00Z")

</div>

Hello @vic.yang,

Thanks for checking. I compared again as promised, and I can now reproduce this outside our app.

**1. About the “call” context**

“call” is not a separate context. DevTools labels the page’s top-level context by its URL path, and ours happens to be `/call`. So “call” in my posts is the same thing as “Main” in yours. No iframe is involved.

**2. Reproduction on a minimal page**

To rule out our own code and DOM, I built a minimal standalone page: plain TypeScript, no framework, only the SDK calls from my first post, with `startVideo({ hd: true, videoElement })`. Each session ends with `detachVideo` → `stopVideo` → `stopAudio` → `leave()` → `ZoomVideo.destroyClient()`, and the page then removes that session’s DOM.

I ran 5 sessions back to back on one page load (SDK 2.6.0, Chrome 157, Windows 11) and took a heap snapshot before and after. DevTools forces a GC before each snapshot.

| Object still alive | Before | After 5 sessions |
| --- | --- | --- |
| RTCPeerConnection | 1 | 6 |
| AudioContext | 1 | 6 |
| AudioWorkletNode | 3 | 13 |
| Worker | 3 | 14 |
| MessagePort | 3 | 13 |
| MediaStreamTrack | 28 | 163 |
| JS heap of the page (after GC) | 41.6 MB | 78.2 MB |

That is 1 RTCPeerConnection, 1 AudioContext, 2 AudioWorkletNodes and about 2 Workers kept per session. Our kiosk app (Chromium 140) shows the same per-session numbers, so this does not come from our app code or DOM.

**3. What keeps them alive (retainer paths in the snapshot)**

- RTCPeerConnection: still referenced through `avSyncMgr` → `pc` → `pc`
- AudioContext: held by an AudioWorkletNode that is still a pending activity, so the context does not seem to be closed
- Worker: held in the `localSharingDecMGR` map, although we never start screen share
- About 98% of the closures created during the 5 sessions and still alive belong to SDK scripts (the `@zoom/videosdk` bundle, `js_media.min.js` and the `wmsc` blob)

**Questions**

1. How was “Main’s memory returns to its pre-join level” measured in your sample app? Could you compare the object counts above in heap snapshots before and after 5 or more sessions on one page load?
2. Is there a supported way to release these at session end? If not, is a page reload the recommended workaround until a fix is available?
3. I can share the repro page source and the heap snapshots. The snapshots contain session data, so I would rather not post them publicly. What is the best private channel?

Thanks,  
Meet

---

<div class="post-metadata">

**Author:** ![meet-jeavio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/meet-jeavio/32/69404_2.png) [@meet-jeavio](https://devforum.zoom.us/u/meet-jeavio)\
**Post date:** [November 20, 2026, 6:39am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/11 "2026-11-20T06:39:14Z")

</div>

Hello @vic.yang , following up on this thread. Is there anything else you need from us to move it forward? Thanks!

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [November 20, 2026, 7:42am UTC](https://devforum.zoom.us/t/web-video-sdk-2-4-0-memory-leak-70-mb-per-session-after-destroyclient-orphaned-vb-worker-created-without-virtual-background/146168/12 "2026-11-20T07:42:37Z")

</div>

Hey @meet-jeavio

We are continuing to investigate, and we will update you promptly as we make progress.

Thanks  
Vic
