GC.addRange in pure function
Petar
Petar
Fri Feb 12 21:54:59 UTC 2021
On Friday, 12 February 2021 at 19:48:01 UTC, vitamin wrote:
> On Wednesday, 10 February 2021 at 16:25:44 UTC, Petar Kirov
> [ZombineDev] wrote:
>> On Wednesday, 10 February 2021 at 13:44:53 UTC, vit wrote:
>>> [...]
>>
>> TL;DR Yes, you can, but it depends on what "without problem"
>> means for you :P
>>
>> [...]
>
> Thanks,
>
> Yes, I am implementing container (ref counted pointer). When
> allcoator is Mallcoator (pure allocate and deallocate) and
> constructor of Type inside rc pointer has pure constructor and
> destructor, then only impure calls was GC.addRange and
> GC.removeRange.
> Now there are marked as pure.
Great, that's the exact idea!
More information about the Digitalmars-d-learn
mailing list