Want reasonable reference counting? Disable automatic sharing of immutable

rikki cattermole rikki at cattermole.co.nz
Tue Nov 16 01:33:35 UTC 2021


On 16/11/2021 2:16 PM, deadalnix wrote:
> On Monday, 15 November 2021 at 21:30:29 UTC, rikki cattermole wrote:
>> There is nothing stopping the compiler putting immutable values in 
>> ROM, nor the user who didn't know that something like __mutable is in 
>> use from making memory they allocated read only.
>>
> 
> How will the compiler put something that is dynamically allocated in ROM?

It won't (or at least I'm not aware that there is a way to do it outside 
of globals/literals).

That particular situation would be for globals or literals.


More information about the Digitalmars-d mailing list