Newly created $(D_PSYMBOL RefCounted!T).
Precondition: allocator !is null && size <= size_t.max / E.sizeof
auto rc = defaultAllocator.refCounted!int(5); assert(rc.count == 1); void func(RefCounted!int param) @nogc { if (param.count == 2) { func(param); } else { assert(param.count == 3); } } func(rc); assert(rc.count == 1);
Constructs a new array with size elements and wraps it in a $(D_PSYMBOL RefCounted).