Is it safe to use smart pointers with wxWidgets?
Say I have something like this
Code: Select all
panel = std::make_unique<wxPanel>(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
I know that in my destructor if I call panel->Destroy() it will deallocate all the components that are associated with the panel.
However, the smart pointer does not call ::Destroy, it instead just deletes the panel when it is out of scope.
Does this achieve the same effect? Or should I just stick to using raw pointers for the widgets?