Skip to content

Commit

Permalink
Fix dangling surfaces in ReactHostImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed May 2, 2024
1 parent 00b3661 commit 18c5bb0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1543,9 +1543,9 @@ private Task<Void> getOrCreateDestroyTask(final String reason, @Nullable Excepti

// Step 3: Stop all React Native surfaces
stopAttachedSurfaces(method, reactInstance);

// TODO(T161461674): Should we clear mAttachedSurfaces?
// Not clearing mAttachedSurfaces could lead to a memory leak.
synchronized (mAttachedSurfaces) {
mAttachedSurfaces.clear();
}

return task;
},
Expand Down

0 comments on commit 18c5bb0

Please sign in to comment.