enable ewk_shutdown() to avoid crash issue, and call application destructor to remove...
authorCho Woong Suk <ws77.cho@samsung.com>
Tue, 12 Jul 2016 12:49:38 +0000 (21:49 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Fri, 15 Jul 2016 05:18:59 +0000 (14:18 +0900)
Change-Id: I8e86d8c995fcca8ddd49f3246ed4efafcc294a8e

runtime/browser/runtime_process.cc
runtime/browser/ui_runtime.cc
runtime/browser/watch_runtime.cc

index 0b0347f..6a190f0 100755 (executable)
@@ -116,8 +116,9 @@ int real_main(int argc, char* argv[]) {
 #ifdef WATCH_FACE_FEATURE_SUPPORT
   } else {
     if (appdata->app_type() == common::ApplicationData::WATCH) {
-      ecore_wl_shutdown();
-      ecore_wl_init(NULL);
+      // Below code will be enabled after testing
+      //ecore_wl_shutdown();
+      //ecore_wl_init(NULL);
     }
 #endif  // WATCH_FACE_FEATURE_SUPPORT
   }
@@ -130,10 +131,7 @@ int real_main(int argc, char* argv[]) {
     ret = runtime->Exec(argc, argv);
     runtime.reset();
   }
-#ifndef PROFILE_WEARABLE
-  LOGGER(DEBUG) << "ewk_shutdown() called";
   ewk_shutdown();
-#endif
   exit(ret);
 
   return EXIT_SUCCESS;
index 6784937..0d149cb 100755 (executable)
@@ -138,6 +138,8 @@ bool UiRuntime::OnCreate() {
 }
 
 void UiRuntime::OnTerminate() {
+  application_.reset();
+  native_window_.reset();
 }
 
 void UiRuntime::OnPause() {
index 26294b5..7756abc 100644 (file)
@@ -95,6 +95,14 @@ bool WatchRuntime::OnCreate() {
 }
 
 void WatchRuntime::OnTerminate() {
+  if (application_) {
+    delete application_;
+    application_ = nullptr;
+  }
+  if (native_window_) {
+    delete native_window_;
+    native_window_ = nullptr;
+  }
 }
 
 void WatchRuntime::OnPause() {