4 ms·
Is it GC pauses? I know .NET's GC is supposed to be pretty good, but Unity is still using the Mono implementation, right? I can barely stand C++, but I'll put
by ReactiveJelly 6y ago
Is it GC pauses?
I know .NET's GC is supposed to be pretty good, but Unity is still using the Mono implementation, right?
I can barely stand C++, but I'll put up with it to avoid long GC pauses or dynamic typing. (JS)
- vertex-four 6y agoUnreal’s C++ code (specifically, anything deriving from UObject) is garbage collected as well.
- rowanG077 6y agoReally? Why is that in the times of smart pointers? You can just malloc a pointer and it gets cleaned up automatically by unity if it's no longer used?
- vertex-four 6y agoBecause you want garbage collection to happen at specific, well-defined times (i.e. in the slack between frames), in a separate thread - not in the middle of rendering a frame on the main thread when you happen to drop something out of scope.
- rowanG077 6y agoStill I can't imagine GC is the best solution for this. You can easily make a memory allocation strategy that hands out shared_pointers or something like it that get cleaned up at will defined times instead of when it goes out of scope for a user.