Skip to content

Commit

Permalink
destroy DeviceAppsLauncherImpl when parent DeviceAppsLauncher is dest…
Browse files Browse the repository at this point in the history
…royed (#3848)

* destroy DeviceAppsLauncherImpl ptr impl_ when parent DeviceAppsLauncher is destroyed

* Update src/components/application_manager/src/app_launch/device_apps_launcher.cc

* Update src/components/application_manager/src/app_launch/device_apps_launcher.cc

* update to new boost download
  • Loading branch information
iCollin authored Jan 31, 2022
1 parent 29f0096 commit 6667140
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/3rd_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ if (HMIADAPTER STREQUAL "messagebroker")
include(ExternalProject)
ExternalProject_Add(
Boost
URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
URL https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.gz
DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system --prefix=${3RD_PARTY_INSTALL_PREFIX}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class DeviceAppsLauncher {
DeviceAppsLauncher(application_manager::ApplicationManager& app_mngr,
app_launch::AppsLauncher& apps_launcher,
const AppLaunchSettings& settings);
~DeviceAppsLauncher();

bool LaunchAppsOnDevice(
const std::string& device_mac,
Expand All @@ -36,7 +37,7 @@ class DeviceAppsLauncher {
private:
application_manager::ApplicationManager& app_mngr_;
const AppLaunchSettings& settings_;
std::auto_ptr<DeviceAppsLauncherImpl> impl_;
DeviceAppsLauncherImpl* impl_;
friend class DeviceAppsLauncherImpl;
DISALLOW_COPY_AND_ASSIGN(DeviceAppsLauncher);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ DeviceAppsLauncher::DeviceAppsLauncher(
, settings_(settings)
, impl_(new DeviceAppsLauncherImpl(*this, apps_launcher)) {}

DeviceAppsLauncher::~DeviceAppsLauncher() {
delete impl_;
impl_ = nullptr;
}

bool DeviceAppsLauncher::StopLaunchingAppsOnDevice(
const std::string& device_mac) {
return impl_->StopLaunchingAppsOnDevice(device_mac);
Expand Down

0 comments on commit 6667140

Please sign in to comment.