AppControl& AppControl::operator=(const AppControl& control) {
if (this != &control) {
+ if (impl_->handle_) {
+ app_control_destroy(impl_->handle_);
+ impl_->handle_ = nullptr;
+ }
+
app_control_h handle = nullptr;
if (app_control_clone(&handle, control.impl_->handle_) !=
APP_CONTROL_ERROR_NONE) {
AppControl& AppControl::operator=(AppControl&& control) {
if (this != &control) {
+ if (impl_->handle_)
+ app_control_destroy(impl_->handle_);
+
impl_->handle_ = control.impl_->handle_;
control.impl_->handle_ = nullptr;
+ app_control_create(&control.impl_->handle_);
}
return *this;
}