GC.addRange in pure function

vitamin vit at vit.vit
Fri Feb 12 19:48:01 UTC 2021


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.


More information about the Digitalmars-d-learn mailing list