Ownership semantics
Matt Elkins via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 31 12:32:56 PST 2016
On Sunday, 31 January 2016 at 20:20:52 UTC, Steven Schveighoffer
wrote:
> Oh, nevermind. This is actually simpler.
>
> You can't do memory operations inside a destructor during
> collection. I forgot about that.
>
> But the rule I stated is still in force.
>
> -Steve
So this implies that the UniquePtr implementation originally
posted might work with malloc/free calls, or some other non-GC
allocator...of course, in that case one could just use
std.typecons.Unique.
More information about the Digitalmars-d-learn
mailing list