Skip to content

Commit 11309e0

Browse files
committed
[Android] Clear blocking relations on drop (#4020)
## Description During tests of new `Clickable` component Gemini pointed out that we have small leak. This PR adds cleanup of blocking relation array on handlers' drop. ## Test plan Expo examples works as it used to
1 parent 4225660 commit 11309e0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class RNGestureHandlerInteractionManager : GestureHandlerInteractionController {
1414
fun dropRelationsForHandlerWithTag(handlerTag: Int) {
1515
waitForRelations.remove(handlerTag)
1616
simultaneousRelations.remove(handlerTag)
17+
blockingRelations.remove(handlerTag)
1718
}
1819

1920
private fun convertHandlerTagsArray(config: ReadableMap, key: String): IntArray {
@@ -64,6 +65,7 @@ class RNGestureHandlerInteractionManager : GestureHandlerInteractionController {
6465
fun reset() {
6566
waitForRelations.clear()
6667
simultaneousRelations.clear()
68+
blockingRelations.clear()
6769
}
6870

6971
companion object {

0 commit comments

Comments
 (0)