There's no implementation of load_widget, but it's also worth to note that it's not best to use make_shared' inside.
Correct me if I'm wrong:
'make_shared` will allocate one block of memory for the control block and for the widget. So when all shared pointers are dead, the weak pointer will live in the cache... and that will also cause the whole memory chunk to be there as well. (Destructors are called, but memory cannot be released)