[Tizen] Stop observing visuals when a control is destroyed 43/247243/1
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 9 Nov 2020 07:30:18 +0000 (16:30 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 9 Nov 2020 07:39:49 +0000 (16:39 +0900)
Change-Id: I6c46f3090cfb8235ed0a081ab328d48c410f039e

dali-toolkit/internal/controls/control/control-data-impl.cpp

index df41523..f74344d 100755 (executable)
@@ -350,6 +350,16 @@ Control::Impl::Impl( Control& controlImpl )
 
 Control::Impl::~Impl()
 {
+  for( auto&& iter : mVisuals )
+  {
+    StopObservingVisual( iter->visual );
+  }
+
+  for( auto&& iter : mRemoveVisuals )
+  {
+    StopObservingVisual( iter->visual );
+  }
+
   // All gesture detectors will be destroyed so no need to disconnect.
   delete mStartingPinchScale;