Function RcPtr.expired

Equivalent to useCount() == 0 (must be RcPtr.WeakType).

bool expired(This)() const nothrow @nogc @property scope @safe;

Method exists only if RcPtr is isWeak

Examples

{
    RcPtr!long x = RcPtr!long.make(123);

    auto wx = x.weak;   //weak pointer

    assert(wx.expired == false);

    x = null;

    assert(wx.expired == true);
}