Struct Weak

Helper struct that keeps a weak reference to a Resource.

struct Weak(T)
  
if (is(T : IAtomicRefCounted));

Constructors

NameDescription
this (obj) Build a Weak instance.

Fields

NameTypeDescription
_obj T

Properties

NameTypeDescription
disposed[get] boolCheck whether the resource has been disposed.

Methods

NameDescription
lock () Return a Rc that contain the underlying resource if it has not been disposed.
reset () Reset the internal reference.