Clear mLastQueriedSurfaceMountingManager on stopSurface (#41590)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Pieter De Baets
2023-11-21 13:44:18 -08:00
committed by Facebook GitHub Bot
parent c497fc61b5
commit bf4e229668
@@ -143,9 +143,12 @@ public class MountingManager {
surfaceMountingManager.stopSurface();
if (surfaceMountingManager == mMostRecentSurfaceMountingManager) {
if (mMostRecentSurfaceMountingManager == surfaceMountingManager) {
mMostRecentSurfaceMountingManager = null;
}
if (mLastQueriedSurfaceMountingManager == surfaceMountingManager) {
mLastQueriedSurfaceMountingManager = null;
}
} else {
ReactSoftExceptionLogger.logSoftException(
TAG,