SharedPtr.expired

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

Method exists only if SharedPtr is isWeak

struct SharedPtr
@property scope const nothrow @safe @nogc
bool
expired
(
this This
)
()

Examples

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

	auto wx = x.weak;   //weak pointer

	assert(wx.expired == false);

	x = null;

	assert(wx.expired == true);
}

Meta