Reset gPreInitializedApplication to reduce reference count 86/265286/2
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 14 Oct 2021 05:33:58 +0000 (14:33 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 19 Oct 2021 04:34:10 +0000 (13:34 +0900)
Change-Id: I50f1140a90569a7c7be419346438e50a3874305d

dali/internal/adaptor/common/application-impl.cpp

index b942190..1311e2a 100644 (file)
@@ -456,7 +456,11 @@ void Application::SetDefaultWindowType(WindowType type)
 
 ApplicationPtr Application::GetPreInitializedApplication()
 {
-  return gPreInitializedApplication;
+  // Reset the handle to decrease the reference count
+  ApplicationPtr application = gPreInitializedApplication;
+  gPreInitializedApplication.Reset();
+
+  return application;
 }
 
 Graphics::Controller& Application::GetController()