Games might be an area where it isn’t too bad since you can disable the GC while doing all your physics and graphics, and then just after you’ve dispatched a frame trigger a GC with a hard time limit.
I don’t know if Unity works like that but it should.
Games might be an area where it isn’t too bad since you can disable the GC while doing all your physics and graphics, and then just after you’ve dispatched a frame trigger a GC with a hard time limit.
I don’t know if Unity works like that but it should.
I don’t think that’s even possible - to have that much control over GC engine that is.
It definitely is.
https://stackoverflow.com/a/32007523/265521
It’s not trivial as it seems. See https://github.com/dotnet/runtime/issues/37667 and enhancement that happened only in .NET 8.
Interesting. From the sounds of it Unity added their own API for it though.