[Dlang-study] Safe Memory Management and Ownership.

Olivier FAURE olivier.faure at epitech.eu
Fri Sep 28 12:12:38 UTC 2018


On Tuesday, 19 June 2018 at 16:38:19 UTC, xray wrote:
> Now, let's distinguish two kind of references, one being 
> "owner" of the object it targets, and other that are smooth 
> references to the same object.

What you're describing is essentially unique pointers.

There are implementations of the concept in D (eg automem's 
Uniqute), but I think they're all hard to write @safe code 
against, because they don't interact with scope too well, or 
something in that vein. DIP-1000 is meant to address that problem.


More information about the Dlang-study mailing list