Skip to content

Commit

Permalink
Clear pointer event metadata when recyling
Browse files Browse the repository at this point in the history
Summary:
Noticed in heap dump that these had many references to other components and were keeping them alive while waiting to be reused.

Changelog: [Internal]

Differential Revision: D51706630
  • Loading branch information
javache authored and facebook-github-bot committed Nov 30, 2023
1 parent 05ed007 commit dc60d62
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public boolean match(int viewTag, String eventName) {
@Override
public void onDispose() {
mPointersEventData = null;
mEventState = null;

MotionEvent motionEvent = mMotionEvent;
mMotionEvent = null;
if (motionEvent != null) {
Expand Down

0 comments on commit dc60d62

Please sign in to comment.