0 votes

I see the "Static memory" number going up the entire time my game is running, particularly from mouse move events being generated.
It's just a C# class that has _Input function.

Am I understanding the profiler wrong?
If not, how does this memory get freed?
Calling GC.Collect doesn't seem to do anything, so does that mean the input event objects are still referenced somehow?

in Engine by (25 points)

We would need to see actual code here. If you are using something that inherits from Node or Object, you may be leaking those. Nodes are only managed as long as they are in the tree. Godot.Objects subclasses are not managed at all unless you inherit from Reference, which is ref counted. There are lot of caveats around 'WeakRef'. I would need to see the code to actually, help, though. If all else can be ruled out, then there may be a bug.

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.