0 votes

I am in the middle of converting a set of unit tests from Unity to Godot. Thus far the experience goes quite well and I was able to not only convert the pure C# stuff but also the 3D and UI test cases.

The big BUT in it all relates to testing finalizers. The finalizers are related to low level custom memory management and are very important. Also it works in Unity(tm).

Taking a deep dive and tracking the collection and finalization of managed objects in certain circumstances (in Debug version) using AtomicInt and WeakReference never yielded in finding a situations/patterns where a certain object (among up to billions of created and released objects) being predictably garbage collected and finalized.

It was not a matter of memory pressure, the latency mode, the time or deregistering + registering for finalizer etc.

So the big question goes:

How can I influence the Garbage Collector's behavior of Godot Mono/C# using some startup/commandline/build settings and what other additional options / possibilities are there?

Thanks!

Godot version 3.3
in Engine by (12 points)

I don't know how I can help you (considering I don't use C#), but I would suggest seeking the help of some of the maintainers of the C# component of the engine. I would look at the repository for the Mono build scripts to see who's contributed, most notably neikeq.

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.