Social media

Paulo Pinto pjmlp at progtools.org
Sat Jun 13 19:05:18 UTC 2020


On Saturday, 13 June 2020 at 18:43:10 UTC, IGotD- wrote:
> On Saturday, 13 June 2020 at 14:43:22 UTC, Paulo Pinto wrote:
>>
>> Indeed, even hard core C++ devs that happen to work with 
>> Unreal, UWP/COM or DriverKit have to make peace with GC 
>> technologies (either tracing or refcounted).
>
> I would suspect that many objects in Unreal engine or any game 
> development kit are reference counted already. The reason is 
> that game engines need to work in an SMP environment and there 
> atomic reference counting suddenly makes a lot of sense. You 
> don't want to free a resource while another CPU is working on 
> it.

Reference counting is a GC algorithm from CS point of view, 
regardless how the anti GC crown tries to sell it otherwise.

Also requires the same level of tracing GC optimization to avoid 
performance bottlenecks or stack overflows.

For example, in C++/WinRT there is background cleaning thread to 
take care of calling destructors when reference count reaches 
zero.




More information about the Digitalmars-d mailing list