I have a plan.. I really DO

Ecstatic Coder ecstatic.coder at gmail.com
Fri Jul 6 20:16:36 UTC 2018


On Friday, 6 July 2018 at 19:22:13 UTC, 12345swordy wrote:
> On Friday, 6 July 2018 at 17:59:27 UTC, Ecstatic Coder wrote:
>
>
>>>> 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.
> For what rhyme or reason!? You shouldn't be allocating and 
> deallocating inside a critical loop in the first place!
> Regardless people have shown you solutions regarding string 
> concatenation. Are you going to address that or you just going 
> to ignore them?
>
> -Alexander

Pfff, it was just an EXAMPLE of how some insignificant string 
concatenation code may eventually be a problem in any GC language 
even if it's done only once per frame.

I've never said that this is something smart to do. I'm just 
saying that this code can perfectly be executed once in a C++ 
game frame without having to worry for a game freeze, because the 
string buffer deallocation is done once per frame too.

While with many GC languages, you actually DON'T KNOW when all 
those unused string buffers will be claimed.

This ignorance is, in my opinion, the root of this "phoebia".

If you disagree with me, fine. No problem. Maybe I'm wrong.

But this is my opinion. Please feel free to ignore it.


More information about the Digitalmars-d-announce mailing list