Skip to content

Commit

Permalink
Clear mLastQueriedSurfaceMountingManager on stopSurface (#41590)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #41590

Causing a small leak while we wait for the surface to be fully destroyed.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D51499256

fbshipit-source-id: 8f9e65898dcb9e0261502028874378ec9cc0f3fc
  • Loading branch information
javache authored and facebook-github-bot committed Nov 21, 2023
1 parent c497fc6 commit bf4e229
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ public void stopSurface(final int surfaceId) {

surfaceMountingManager.stopSurface();

if (surfaceMountingManager == mMostRecentSurfaceMountingManager) {
if (mMostRecentSurfaceMountingManager == surfaceMountingManager) {
mMostRecentSurfaceMountingManager = null;
}
if (mLastQueriedSurfaceMountingManager == surfaceMountingManager) {
mLastQueriedSurfaceMountingManager = null;
}
} else {
ReactSoftExceptionLogger.logSoftException(
TAG,
Expand Down

0 comments on commit bf4e229

Please sign in to comment.