# Dynamic instance buffer memory leak when streaming real-time coordinate updates in Babylon.js

**URL:** <https://forum.babylonjs.com/t/dynamic-instance-buffer-memory-leak-when-streaming-real-time-coordinate-updates-in-babylon-js/63847>\
**Category:** Questions\
**Created:** [July 22, 2026, 6:15pm UTC](https://forum.babylonjs.com/t/dynamic-instance-buffer-memory-leak-when-streaming-real-time-coordinate-updates-in-babylon-js/63847 "2026-07-22T18:15:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [July 22, 2026, 9:57pm UTC](https://forum.babylonjs.com/t/dynamic-instance-buffer-memory-leak-when-streaming-real-time-coordinate-updates-in-babylon-js/63847/4 "2026-07-22T21:57:12Z")

</div>

It may be somehow related to [Thin Instance vertex buffer memory leak (thinInstanceSetBuffer) - #5 by sebavan](https://forum.babylonjs.com/t/thin-instance-vertex-buffer-memory-leak-thininstancesetbuffer/59351/5)

Which Babylon version do you use?

Some other tips:

- Call `thinInstanceSetBuffer` only during initialization or capacity changes.
- Use a dynamic buffer plus `thinInstanceBufferUpdated` or partial updates.
- Apply WebSocket state atomically during `onBeforeRenderObservable`.
- Refresh or conservatively expand thin-instance bounds.
- Render shadow maps every frame while their lights or casters are moving.

---

_[View the full topic](https://forum.babylonjs.com/t/dynamic-instance-buffer-memory-leak-when-streaming-real-time-coordinate-updates-in-babylon-js/63847)._
