RefCounted.this

Takes ownership over value, setting the counter to 1. value may be a pointer, an object or a dynamic array.

  1. this(Payload!T value, Allocator allocator)
  2. this(Allocator allocator)
    struct RefCounted(T)
    this

Parameters

allocator Allocator

Allocator used to destroy the value and to allocate/deallocate internal storage.

Precondition: allocator !is null

Meta