+1 vote

I have a script where I generate some MeshInstance's when _ready() is called.
In the same script, _process() toggles the visibility of all the MeshInstances on every update.

When I play the game, the Static Memory constantly, indefinitely, and permanently increases!


More details:
+No other memory monitor stats increase.
+Letting it run for an hour resulted in the Godot using 16GB of memory (and climbing).
+Freeing all MeshInstance objects from memory does not lower the Static Memory usage.
+Toggling visibility every second instead of every frame yields the same results, but with a slower increase in Static Memory.


Here is my project file. Please help!
https://drive.google.com/file/d/1TNzOo5HNoXt2lvsqdF40AUuoBuCQ_LUV/view?usp=sharing

Godot version 3.4.2
in Engine by (35 points)

Can You please paste this script here instead ?

1 Answer

0 votes
Best answer

Turns out this was a bug; I opened an issue on the godotengine github and it has already been resolved!

Click here for more details:
https://github.com/godotengine/godot/issues/57555

The issue is only present when having "Use Bvh" on in the Rendering settings.

by (35 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.