Ownership/Lifetime management issue
Why not separate the 2D element into two parts.


The interface that can be used
The shared resource

Used by the Draw2D interface
Used by the D2Elements.



Then D2Elements does not need to depend on an object that can go out of scope, they have partial ownership of the shared resource (with any common data that they and the Draw2D needs.

class Draw2D
{
    // interface as before
    // Weak pointers as before.

    std::shared_ptr&lt;SharedResource&gt;   data;
};

class D2Element
{
    //... As before.

    std::shared_ptr&lt;SharedResource&gt;   sharedData;
};


Even of the Draw2D's lifetime ends, then the shared resource (because it is shared with any created children) will not die and thus not be destroyed.