How does D manage ownership of objects? For example I need to express the following:
1.) Allocate an object
2.) Give out references/pointers
3.) If the initially allocated object is deleted,
all references/pointers should become inaccessible.
In C++ this is possible with std::shared_ptr + std::weak_ptr. Is this also possible in D?