+ operator bool() const
+ {
+ return _wx != nullptr;
+ }
+
+ void reset()
+ {
+ if (_wx) {
+ _wx->Destroy();
+ _wx = nullptr;
+ }
+ }
+
+ template <typename... Args>
+ void reset(Args&&... args)
+ {
+ if (_wx) {
+ _wx->Destroy();
+ _wx = nullptr;
+ }
+ _wx = new T(std::forward<Args>(args)...);
+ }
+