Want reasonable reference counting? Disable automatic sharing of immutable

Dukc ajieskola at gmail.com
Sun Nov 14 10:06:01 UTC 2021


On Sunday, 14 November 2021 at 07:16:43 UTC, Walter Bright wrote:
> On 11/12/2021 4:31 AM, Steven Schveighoffer wrote:
>> One of the prerequisites to doing reference counting is to 
>> have a mutable piece of data inside an immutable piece of data.
>
> Or maybe just give up on having immutable ref counted objects. 
> Ref counted objects are mutable.

The object can still be immutable, but the reference count and 
the references, save for weak pointers, can't. I think.


More information about the Digitalmars-d mailing list