C# uses ref counting, which has much less impact on that. I do however use D for my game engine, which some say is infamous for its GC pauses, but they only happen if you allocate with the GC itself, and otherwise if you work work the GC, you can get some performance gains compared to dumb manual memory management, but not so much if you actually can manage your own memory, or write your own automatic memory management system, like I did on top of numem. Otherwise the pauses are negligible for smaller projects, and some of the larger projects like The Art of Reflection uses GC only for loading assets, with my engine also going in that direction.
I don’t think so. Ref counting is a counter associated with the object which counts references to it and when it becomes null, object is destroyed. Hence ref counting. While GC does graph traversal to find which objects can be reached and marks unreachable ones as candidates for destroying.
C# uses ref counting, which has much less impact on that. I do however use D for my game engine, which some say is infamous for its GC pauses, but they only happen if you allocate with the GC itself, and otherwise if you work work the GC, you can get some performance gains compared to dumb manual memory management, but not so much if you actually can manage your own memory, or write your own automatic memory management system, like I did on top of numem. Otherwise the pauses are negligible for smaller projects, and some of the larger projects like The Art of Reflection uses GC only for loading assets, with my engine also going in that direction.
Um, no, C# most definitely uses GC, not ref counting, and you can’t not use it.
Ref counting is still GC…
I don’t think so. Ref counting is a counter associated with the object which counts references to it and when it becomes null, object is destroyed. Hence ref counting. While GC does graph traversal to find which objects can be reached and marks unreachable ones as candidates for destroying.