Skip to content

Commit 6667140

Browse files
authored
destroy DeviceAppsLauncherImpl when parent DeviceAppsLauncher is destroyed (#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
1 parent 29f0096 commit 6667140

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/3rd_party/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ if (HMIADAPTER STREQUAL "messagebroker")
222222
include(ExternalProject)
223223
ExternalProject_Add(
224224
Boost
225-
URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
225+
URL https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.gz
226226
DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
227227
SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
228228
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system --prefix=${3RD_PARTY_INSTALL_PREFIX}

src/components/application_manager/include/application_manager/app_launch/device_apps_launcher.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class DeviceAppsLauncher {
2525
DeviceAppsLauncher(application_manager::ApplicationManager& app_mngr,
2626
app_launch::AppsLauncher& apps_launcher,
2727
const AppLaunchSettings& settings);
28+
~DeviceAppsLauncher();
2829

2930
bool LaunchAppsOnDevice(
3031
const std::string& device_mac,
@@ -36,7 +37,7 @@ class DeviceAppsLauncher {
3637
private:
3738
application_manager::ApplicationManager& app_mngr_;
3839
const AppLaunchSettings& settings_;
39-
std::auto_ptr<DeviceAppsLauncherImpl> impl_;
40+
DeviceAppsLauncherImpl* impl_;
4041
friend class DeviceAppsLauncherImpl;
4142
DISALLOW_COPY_AND_ASSIGN(DeviceAppsLauncher);
4243
};

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

+5
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ DeviceAppsLauncher::DeviceAppsLauncher(
196196
, settings_(settings)
197197
, impl_(new DeviceAppsLauncherImpl(*this, apps_launcher)) {}
198198

199+
DeviceAppsLauncher::~DeviceAppsLauncher() {
200+
delete impl_;
201+
impl_ = nullptr;
202+
}
203+
199204
bool DeviceAppsLauncher::StopLaunchingAppsOnDevice(
200205
const std::string& device_mac) {
201206
return impl_->StopLaunchingAppsOnDevice(device_mac);

0 commit comments

Comments
 (0)