On Friday, 6 July 2018 at 17:22:15 UTC, 12345swordy wrote:
On Friday, 6 July 2018 at 17:16:54 UTC, Ecstatic Coder wrote:
Are you seriously going to ignore video games that are entirely implemented in GC focus language such as C#/java?! The GC is NOT AN ISSUE IF YOU KNOW WHAT YOU ARE DOING!

-Alexander

+1

You are start reminding me of another person who pull these type of stunts. Which is not a good thing btw, as that guy is a notorious troll.


So if I agree with you, then I'm a troll ?

While ANY C++ game can make ANY number of allocations/allocations inside a game loop and still run without a risking any freeze.
You are doing something very wrong if you are doing this.

-Alexander

Just try it.

Inside the game loop, add a for loop which evaluates the score text 100 times as explained above.

Or even 1000 times.

This means roughly 2000 allocations and 1999 deallocations.

Your frame rate suffer will suffer from this, which is bad (and as such should absolutely avoided) but zero risk of garbage collection freeze.

Then add ONE time the "naive" text score concatenation in the game loop of a garbage collected loop, and you expose yourself to a RISK of a garbage collection freeze. Just because of ONE string concatenation, executed only once per frame, which is something that could be tolerated in a C++ game.



Reply via email to