From: Heeyong Song Date: Wed, 29 Jul 2020 02:26:06 +0000 (+0900) Subject: [Tizen] Fix mGestureRecognizer leak X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8abbd3d4c2bf186a3961b33a474a3f7564fdabf3;p=platform%2Fcore%2Fuifw%2Fdali-core.git [Tizen] Fix mGestureRecognizer leak IntrusivePtr::Detach doesn't decrease the reference count. So mGestureRecognizer isn't deleted. Change-Id: Id923e1be0e2646a74c70ec998b2fcab95641035d --- diff --git a/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp b/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp index b707e24..e0c4a5d 100644 --- a/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp +++ b/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp @@ -252,7 +252,7 @@ void LongPressGestureProcessor::RemoveGestureDetector( LongPressGestureDetector* if ( mLongPressGestureDetectors.empty() ) { - mGestureRecognizer.Detach(); + mGestureRecognizer = nullptr; } else { diff --git a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp index 51bef8d..7110929 100644 --- a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp +++ b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp @@ -320,7 +320,7 @@ void PanGestureProcessor::RemoveGestureDetector( PanGestureDetector* gestureDete if (mPanGestureDetectors.empty()) { - mGestureRecognizer.Detach(); + mGestureRecognizer = nullptr; } else { diff --git a/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp b/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp index c373fae..0fb287e 100644 --- a/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp +++ b/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp @@ -250,7 +250,7 @@ void PinchGestureProcessor::RemoveGestureDetector( PinchGestureDetector* gesture if (mPinchGestureDetectors.empty()) { - mGestureRecognizer.Detach(); + mGestureRecognizer = nullptr; } } diff --git a/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp b/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp index f65642e..9f1e647 100644 --- a/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp +++ b/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp @@ -224,7 +224,7 @@ void RotationGestureProcessor::RemoveGestureDetector( RotationGestureDetector* g if (mRotationGestureDetectors.empty()) { - mGestureRecognizer.Detach(); + mGestureRecognizer = nullptr; } } diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp b/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp index f003812..cf74b6f 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp +++ b/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp @@ -223,7 +223,7 @@ void TapGestureProcessor::RemoveGestureDetector( TapGestureDetector* gestureDete if ( mTapGestureDetectors.empty() ) { - mGestureRecognizer.Detach(); + mGestureRecognizer = nullptr; ResetActor(); }