Struct std.experimental.allocator.RCIAllocator
A reference counted struct that wraps the dynamic allocator interface. This should be used wherever a uniform type is required for encapsulating various allocator implementations.
struct RCIAllocator
;
Code that defines allocators ultimately implements the IAllocator
interface, possibly by using CAllocatorImpl
below, and then build a
RCIAllocator
out of this.
Composition of allocators is not recommended at this level due to
inflexibility of dynamic interfaces and inefficiencies caused by cascaded
multiple calls. Instead, compose allocators using the static interface defined
in std
, then adapt the composed
allocator to RCIAllocator
(possibly by using allocatorObject
below).