# \#memory-leak

**URL:** https://discourse.threejs.org/tag/memory-leak/319.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Safari memory leak when scene dipose and rebuid serval times](https://discourse.threejs.org/t/safari-memory-leak-when-scene-dipose-and-rebuid-serval-times/59014)

<div class="topic-metadata">

**Author:** [@duanjz.nnu](https://discourse.threejs.org/u/duanjz.nnu)\
**Replies:** 4\
**Last updated:** [September 17, 2025, 12:24pm UTC](https://discourse.threejs.org/t/safari-memory-leak-when-scene-dipose-and-rebuid-serval-times/59014 "2025-09-17T12:24:33Z")

</div>

I have created a scene using THREEJS that loads GLTF files and image-format tile maps. When I repeatedly destroy and rebuild the scene(ensuring that each destruction removes DOM nodes and all relevant THREEJS objects), I…

---

## [Seeking Advice on Three.js Instance Placement Performance](https://discourse.threejs.org/t/seeking-advice-on-three-js-instance-placement-performance/67434)

<div class="topic-metadata">

**Author:** [@VictorHurtado](https://discourse.threejs.org/u/VictorHurtado)\
**Replies:** 5\
**Last updated:** [June 29, 2024, 4:51am UTC](https://discourse.threejs.org/t/seeking-advice-on-three-js-instance-placement-performance/67434 "2024-06-29T04:51:56Z")

</div>

Hello, everyone. I am once again requiring your aid. I’m currently working on a project where my goal is to dynamically place instances of objects with clicks (like voxels) to make it more mobile friendly, but I’ve enc…

---

## [Applying physics to a destructive/dinamic, did it become heavy?](https://discourse.threejs.org/t/applying-physics-to-a-destructive-dinamic-did-it-become-heavy/66879)

<div class="topic-metadata">

**Author:** [@didi\_softwares](https://discourse.threejs.org/u/didi_softwares)\
**Replies:** 1\
**Last updated:** [June 15, 2024, 2:50pm UTC](https://discourse.threejs.org/t/applying-physics-to-a-destructive-dinamic-did-it-become-heavy/66879 "2024-06-15T14:50:11Z")

</div>

https://didisoftwares.ddns.net/8 Can you tell me if it was heavy? First of all, the code and generation of grids and meshes belong to someone else. I just removed some things that were left over to have less triangl…

---

## [Headless Rendering Memory Usage](https://discourse.threejs.org/t/headless-rendering-memory-usage/60618)

<div class="topic-metadata">

**Author:** [@Fareck\_Allony](https://discourse.threejs.org/u/Fareck_Allony)\
**Replies:** 2\
**Last updated:** [January 25, 2024, 8:36am UTC](https://discourse.threejs.org/t/headless-rendering-memory-usage/60618 "2024-01-25T08:36:46Z")

</div>

Hello everyone. I am using headless-gl to do some offscreen rendering. In my case I have a scene where add some objects to it, take a screen shot and then add more objects and then take another screen shot and so on, t…

---

## [Memory Leak With New Scenes](https://discourse.threejs.org/t/memory-leak-with-new-scenes/29917)

<div class="topic-metadata">

**Author:** [@Melih\_Unsal](https://discourse.threejs.org/u/Melih_Unsal)\
**Replies:** 8\
**Last updated:** [December 6, 2023, 3:57pm UTC](https://discourse.threejs.org/t/memory-leak-with-new-scenes/29917 "2023-12-06T15:57:46Z")

</div>

Hi, I am using react with threejs and not using react-fiber-three for some reason. I put threejs render code inside useEffect. I render 6 scenes and since they can change depending on the user’s data dynamically, i put t…

---

## [Does threejs leak memory?](https://discourse.threejs.org/t/does-threejs-leak-memory/51054)

<div class="topic-metadata">

**Author:** [@ScottPendleton](https://discourse.threejs.org/u/ScottPendleton)\
**Replies:** 10\
**Last updated:** [May 3, 2023, 2:51pm UTC](https://discourse.threejs.org/t/does-threejs-leak-memory/51054 "2023-05-03T14:51:11Z")

</div>

I use Threejs to make some fairly simply scenes, as shown, depicting a well. But I will display well after well after well, and that seems to cause the computer UI and the UI of any open programs to bog down. That mak…

---

## [DRACOLoader object URL not disposed](https://discourse.threejs.org/t/dracoloader-object-url-not-disposed/46103)

<div class="topic-metadata">

**Author:** [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Replies:** 6\
**Last updated:** [April 26, 2023, 11:59am UTC](https://discourse.threejs.org/t/dracoloader-object-url-not-disposed/46103 "2023-04-26T11:59:15Z")

</div>

This is never disposed:

---

## [R3F/ThreeJS, Memory Leak when Canvas is Scrolled out of View](https://discourse.threejs.org/t/r3f-threejs-memory-leak-when-canvas-is-scrolled-out-of-view/48440)

<div class="topic-metadata">

**Author:** [@D-Nugent](https://discourse.threejs.org/u/D-Nugent)\
**Replies:** 10\
**Last updated:** [March 8, 2023, 12:32am UTC](https://discourse.threejs.org/t/r3f-threejs-memory-leak-when-canvas-is-scrolled-out-of-view/48440 "2023-03-08T00:32:33Z")

</div>

Good Evening/Morning Everyone, Hoping that someone can help. I’m relatively new to the threeJS, react-fiber and 3d modelling world. I managed to get a 3D model loaded on a webpage I’m building. I got the model animatio…

---

## [Properly disposing of THREE.EffectComposer](https://discourse.threejs.org/t/properly-disposing-of-three-effectcomposer/8415)

<div class="topic-metadata">

**Author:** [@wellcaffeinated](https://discourse.threejs.org/u/wellcaffeinated)\
**Replies:** 12\
**Last updated:** [March 7, 2023, 6:20pm UTC](https://discourse.threejs.org/t/properly-disposing-of-three-effectcomposer/8415 "2023-03-07T18:20:13Z")

</div>

I’ve got a multi-page application setup where renderers are created and destroyed when navigating to a different route. I’m using THREE.EffectComposer with a THREE.RenderPass and THREE.OutlinePass… but they don’t have di…

---

## [Memory consumption in stats increases on every refresh](https://discourse.threejs.org/t/memory-consumption-in-stats-increases-on-every-refresh/45040)

<div class="topic-metadata">

**Author:** [@Pravin\_Poudel](https://discourse.threejs.org/u/Pravin_Poudel)\
**Replies:** 3\
**Last updated:** [November 23, 2022, 6:13am UTC](https://discourse.threejs.org/t/memory-consumption-in-stats-increases-on-every-refresh/45040 "2022-11-23T06:13:02Z")

</div>

I have multiple asynchronous code 2 texture loaders and a STL file loader const satelliteLoader = new THREE.TextureLoader() satelliteLoader.load( \`./img/Region\_${metaState.region}\_RGB.png\`, function (texture) { …

---

## [Out of control memory when updating position of lines within animate function](https://discourse.threejs.org/t/out-of-control-memory-when-updating-position-of-lines-within-animate-function/33740)

<div class="topic-metadata">

**Author:** [@Idrees](https://discourse.threejs.org/u/Idrees)\
**Replies:** 8\
**Last updated:** [August 25, 2022, 3:44am UTC](https://discourse.threejs.org/t/out-of-control-memory-when-updating-position-of-lines-within-animate-function/33740 "2022-08-25T03:44:40Z")

</div>

Hello, I was wondering if the following problem is a result of user error or if it is a bug. When updating the position of fat lines from the Three.js examples in the onAnimate callback, memory usage in Firefox constantl…

---

## [Acumulation of memory when I reload the page](https://discourse.threejs.org/t/acumulation-of-memory-when-i-reload-the-page/9096)

<div class="topic-metadata">

**Author:** [@ricardo](https://discourse.threejs.org/u/ricardo)\
**Replies:** 9\
**Last updated:** [March 26, 2022, 1:27pm UTC](https://discourse.threejs.org/t/acumulation-of-memory-when-i-reload-the-page/9096 "2022-03-26T13:27:03Z")

</div>

Hi, I have a problem with memory of my laptop. My app use about 1,5 GB of memory, and each time I reload the page to check the new code out, the amount of memory increases, that is, next time the memory is 3GB, and the n…

---

## [Correctly remove mesh from scene and dispose material and geometry](https://discourse.threejs.org/t/correctly-remove-mesh-from-scene-and-dispose-material-and-geometry/5448)

<div class="topic-metadata">

**Author:** [@MichaelJendryke](https://discourse.threejs.org/u/MichaelJendryke)\
**Replies:** 16\
**Last updated:** [January 29, 2022, 12:54pm UTC](https://discourse.threejs.org/t/correctly-remove-mesh-from-scene-and-dispose-material-and-geometry/5448 "2022-01-29T12:54:08Z")

</div>

Let’s say I create thousands of meshes like: pseudo code for 10000 IDs in array{ var cellgeom = createCellGeom( hex\[ID\] ); var cellmaterial = createCellMaterial( color\[ID\] ); var cellmesh = new THREE.Mesh( …

---

## [Sprite.remove(); doesn't work -- it's left on the scene](https://discourse.threejs.org/t/sprite-remove-doesnt-work-its-left-on-the-scene/32352)

<div class="topic-metadata">

**Author:** [@Andrew\_Normore](https://discourse.threejs.org/u/Andrew_Normore)\
**Replies:** 1\
**Last updated:** [December 4, 2021, 8:21am UTC](https://discourse.threejs.org/t/sprite-remove-doesnt-work-its-left-on-the-scene/32352 "2021-12-04T08:21:19Z")

</div>

I switched over to using Sprites, but now my .remove functions are left behind and pile up, killing CPU. How do I remove this?!

---

## [Performance Issue Upon Clearing and Regenerating Scene (Heap Size, Event Listener, and Node Increase)](https://discourse.threejs.org/t/performance-issue-upon-clearing-and-regenerating-scene-heap-size-event-listener-and-node-increase/14169)

<div class="topic-metadata">

**Author:** [@c0d3ster](https://discourse.threejs.org/u/c0d3ster)\
**Replies:** 4\
**Last updated:** [November 9, 2021, 5:20pm UTC](https://discourse.threejs.org/t/performance-issue-upon-clearing-and-regenerating-scene-heap-size-event-listener-and-node-increase/14169 "2021-11-09T17:20:52Z")

</div>

Hello everyone, I have been working on a configurable audio reactive visualizer for a while now, and have come to the point where I have some issues with performance that I’ve yet to identify the cause of. The name of th…

---

## [Memory issues with lot of objects](https://discourse.threejs.org/t/memory-issues-with-lot-of-objects/31200)

<div class="topic-metadata">

**Author:** [@JRefusta](https://discourse.threejs.org/u/JRefusta)\
**Replies:** 4\
**Last updated:** [October 28, 2021, 2:33pm UTC](https://discourse.threejs.org/t/memory-issues-with-lot-of-objects/31200 "2021-10-28T14:33:11Z")

</div>

Hi everyone, I’m loading a lot of .obj files with with its corresponding .mtls. I found that the total memory allocated doing this process its ~200MB. using Chrome Dev Tools I found that almost the half part of that mem…

---

## [WebAssembly.Memory(): could not allocate memory on mobile browsers](https://discourse.threejs.org/t/webassembly-memory-could-not-allocate-memory-on-mobile-browsers/30611)

<div class="topic-metadata">

**Author:** [@bhushan6](https://discourse.threejs.org/u/bhushan6)\
**Replies:** 0\
**Last updated:** [October 8, 2021, 5:50am UTC](https://discourse.threejs.org/t/webassembly-memory-could-not-allocate-memory-on-mobile-browsers/30611 "2021-10-08T05:50:53Z")

</div>

My three js app is running good on desktops but giving me an error on mobile devices I do not understand the memory usage here What could be the problem?

---

## [Memory leak issue](https://discourse.threejs.org/t/memory-leak-issue/21366)

<div class="topic-metadata">

**Author:** [@Sveny](https://discourse.threejs.org/u/Sveny)\
**Replies:** 5\
**Last updated:** [December 11, 2020, 10:54pm UTC](https://discourse.threejs.org/t/memory-leak-issue/21366 "2020-12-11T22:54:23Z")

</div>

I’m loading different types of animals in my scene. When I leave the page I want to dispose all the animals. I try to do that with this code: animals.forEach((animal) =\> { scene.remove(animal); disposeH…

---

## [Performance issues ThreeJS & ReactJS](https://discourse.threejs.org/t/performance-issues-threejs-reactjs/21349)

<div class="topic-metadata">

**Author:** [@Sveny](https://discourse.threejs.org/u/Sveny)\
**Replies:** 3\
**Last updated:** [December 8, 2020, 3:09pm UTC](https://discourse.threejs.org/t/performance-issues-threejs-reactjs/21349 "2020-12-08T15:09:26Z")

</div>

I’m having some performances issues with ThreeJS & ReactJS. I’m having different pages with ThreeJS scenes. I’m using useEffect and on the callback function, I remove the children of the scene. This is my callback funct…

---

## [SkinnedMesh texture leak](https://discourse.threejs.org/t/skinnedmesh-texture-leak/19907)

<div class="topic-metadata">

**Author:** [@Blitzy](https://discourse.threejs.org/u/Blitzy)\
**Replies:** 2\
**Last updated:** [October 19, 2020, 10:35pm UTC](https://discourse.threejs.org/t/skinnedmesh-texture-leak/19907 "2020-10-19T22:35:14Z")

</div>

I’m in the midst of doing a bunch of optimization work on a product that we are launching in a week or so I discovered that we had a texture memory leak somewhere. I spent a bunch of time tracking it down and using vario…

---

## [Add/Remove scene object geometry memory leak related](https://discourse.threejs.org/t/add-remove-scene-object-geometry-memory-leak-related/19503)

<div class="topic-metadata">

**Author:** [@PompiJs](https://discourse.threejs.org/u/PompiJs)\
**Replies:** 6\
**Last updated:** [October 8, 2020, 12:37pm UTC](https://discourse.threejs.org/t/add-remove-scene-object-geometry-memory-leak-related/19503 "2020-10-08T12:37:31Z")

</div>

I have seem to be able to create the memory leak bug I talked about before. It seems that adding and removing Meshes in THREE.js from a scene, creates a memory leak in VRAM. This seem to be related to geometry, as the …

---

## [Problems deleting assets from memory](https://discourse.threejs.org/t/problems-deleting-assets-from-memory/16463)

<div class="topic-metadata">

**Author:** [@Ismael\_Sanz\_Gonzalez](https://discourse.threejs.org/u/Ismael_Sanz_Gonzalez)\
**Replies:** 5\
**Last updated:** [June 23, 2020, 9:43am UTC](https://discourse.threejs.org/t/problems-deleting-assets-from-memory/16463 "2020-06-23T09:43:03Z")

</div>

Hi all, I have a script that generates shapes dynamically and then deletes them all to recreate them again with different parameters. I can manage to eliminate them and recreate them, but it looks like all the geometry…

---

## [GLTFLoader crashing on iPad](https://discourse.threejs.org/t/gltfloader-crashing-on-ipad/6009)

<div class="topic-metadata">

**Author:** [@Mario\_Plantosar](https://discourse.threejs.org/u/Mario_Plantosar)\
**Replies:** 5\
**Last updated:** [February 8, 2019, 1:15pm UTC](https://discourse.threejs.org/t/gltfloader-crashing-on-ipad/6009 "2019-02-08T13:15:23Z")

</div>

Hi all, I am trying to load a sizable model (10-15MB) on an ipad but the browser keeps crashing. I got it to load and it works ok, but it is meant to be some sort of configurator website so if a user clicks a button anot…

---

## [Potential memory leak in my animation engine](https://discourse.threejs.org/t/potential-memory-leak-in-my-animation-engine/1584)

<div class="topic-metadata">

**Author:** [@janimator0](https://discourse.threejs.org/u/janimator0)\
**Replies:** 12\
**Last updated:** [February 17, 2018, 9:04am UTC](https://discourse.threejs.org/t/potential-memory-leak-in-my-animation-engine/1584 "2018-02-17T09:04:18Z")

</div>

I’m working on a 2D animation system. You can find an example of it in action over at http://artisanimation.com/UnimHTML/TapTitans2Web.html Every frame there is UV manipulation and vertex matrix manipulation. I’m not su…

---

## [My game is taking up 100% cpu usage and crashing on some devices](https://discourse.threejs.org/t/my-game-is-taking-up-100-cpu-usage-and-crashing-on-some-devices/1693)

<div class="topic-metadata">

**Author:** [@janimator0](https://discourse.threejs.org/u/janimator0)\
**Replies:** 1\
**Last updated:** [January 26, 2018, 5:19pm UTC](https://discourse.threejs.org/t/my-game-is-taking-up-100-cpu-usage-and-crashing-on-some-devices/1693 "2018-01-26T17:19:14Z")

</div>

I’m not an HTML5 developer, but I put together this game really quick to test out the capabilities of three.js and html5. Unfortunately, the game is taking up 100% CPU usage and there seems to be a memory leak or somethi…

---

## [Memory leak issue in chrome](https://discourse.threejs.org/t/memory-leak-issue-in-chrome/1071)

<div class="topic-metadata">

**Author:** [@edap](https://discourse.threejs.org/u/edap)\
**Replies:** 9\
**Last updated:** [October 25, 2017, 7:20am UTC](https://discourse.threejs.org/t/memory-leak-issue-in-chrome/1071 "2017-10-25T07:20:29Z")

</div>

I need to create a THREE.Group containing ~600 object. The objects inside this group need to be recreated with a high frequency. I’ve a method that propulate the group, and a method that reset the group. The method that …
