Want reasonable reference counting? Disable automatic sharing of immutable

Walter Bright newshound2 at digitalmars.com
Sun Nov 14 19:51:04 UTC 2021


On 11/14/2021 10:25 AM, Timon Gehr wrote:
> How do you manually deallocate an immutable payload?

The same way it is done now. Call free().

Calling free() on an object ends its lifetime. As I mentioned to Steven, 
lifetime and mutability are independent attributes.



More information about the Digitalmars-d mailing list