Copy Constructor.
Constructs a shared_ptr with the given memory address.
Destructor.
Borrows a weak reference from the shared pointer.
Whether the smart pointer value is still valid.
The value stored within the smart pointer.
auto wp = shared_new!int(42); if (wp.isValid) { // Use the value. }
Threadsafety: The internal reference count kept by shared_ptr is not atomic. As such you should take care with accessing the value and refcount stored within.
nulib.memory.unique_ptr.unique_ptr nulib.memory.weak_ptr.weak_ptr
A shared pointer
Shared pointers are a form of automatic reference counting. An internal heap-allocated object stores a reference to the refcounted object.
You may borrow weak references from shared_ptr, these weak references may become invalid at any point, so make sure to check the state of the object using isValid.