SWeakWidget is basically a wrapper that provides some helpers to see if your widget is in fact SNullWidget. As far as I can tell, the samples use it when adding viewport content so that you can just drop your last widget reference in order to “remove” it from the viewport. I haven’t carried the abstraction over from the samples, so I’m not 100% sure that’s how it works. You can probably test it out by zeroing out your last reference to MainInventoryUI to see if that removes it from the viewport.
But if you’re in a similar situation as mine and you do not actually want to destroy the widget when hiding it, then you can probably just remove the weak widget wrapper and add just the one pointer directly, yes.