-
-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Godot leaking massive memory just by itself #82769
Description
Godot version
4.1.1 stable
System information
macOS Montery 12.5.1, 16GB RAM, Forward+ Renderer
Issue description
When running a project from godot (pressing the play button), the new window will just keep leaking memory, regardless of project size.
The Tests:
I set up a new project, added a scene and tested the following:
- Just a single Node as the scene root, nothing else
- Just a single Node2D as the scene root, nothing else
- Node as Scene Root, then 20 Node2Ds as children
- Node as scene root, then 20 Node2Ds with processing disabled as children
- Finally another run with just a node, to see if it would yield different results as the first run with a single node (it did)
While running the tests I didn't do anything else, just kept the Godot window open in the background.
I tested every configuration for at least 2 hours, some longer (except for the last one, ran out of time)
As you can see even just an empty scene in an empty project will keep growing in memory usage, my guess is indefinetly. Notably the last test (with an empty scene, containing just an empty Node) grew the fastest. Likewise the tests with 20 Node2Ds yielded similar resuts, regardless of processing being turned on or of. This leads me to believe that godot itself is leaking memory, not the nodes.
I will also attach all screenshots I took during those tests, showing my activity monitor (which is apples task manager). You can see how the memory usage changed over time. I tried to take a screenshot about every 30 minutes.
Single Node:
Single Node2D:
20 Node2Ds:
20 Node2Ds with processing turned off:
Single Node (again after all other tests)
Steps to reproduce
Create an empty project. Create an empty scene. Run that project. Observe memory usage growing.






























