GC is not surrendering control. That seems to be HN's #1 bug bear. The sensation that someone or something is taking control away from you. The proper way to frame this is that you can actually focus on the original problem you set out to solve. Risking memory leaks is crazy when it's not something the customer is demanding. Even in gaming I think the GC is fine. There are ways to spread the impact across frames and bound the amount of time spent collecting.
If your clever scheme wouldn't work with a GC-managed heap, it probably won't work with one managed by hand either.
But it really depends on what you're doing. You can use the wrong tool for a job, but you can also use the right tool. It depends on the job.
To be fair, it is also probably the number one cause of long hitches in poorly optimized UE games, and also the main contributor to class of use-after-free bugs (persisted native pointers and references to objects that weren't properly added to the object graph, though goes away with proper usage of weak object pointers and the like) so it is very much a double-edged-sword.
Agreed that it’s no longer a bottleneck for games; profile—and-optimize approaches are very effective and the tooling has never been better.
Or rather GC done explicit.
You control when and where and how garbage gets collected in various buckets and disposed off.
Without the performance hit of fully automatic GC.
> Risking memory leaks is crazy when it's not something the customer is demanding.
Memory leaks have NEVER been a significant source of bugs.
Memory corruption has always been the problem (lack of memory safety, ie. operating in perpetual unsafe block), not the memory leaks.
Memory leaks are relatively trivial to track and account for in comparison.