Skip to content

Commit c260b38

Browse files
authored
[DevTools] Clean up Virtual Instances from id map (facebook#34063)
This was a pretty glaring memory leak. 🙈 I forgot to clean up the VirtualInstances from the id map so the Server Component instances always leaked in DEV.
1 parent 5bbf9be commit c260b38

File tree

1 file changed

+2
-0
lines changed
  • packages/react-devtools-shared/src/backend/fiber

1 file changed

+2
-0
lines changed

packages/react-devtools-shared/src/backend/fiber/renderer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,6 +2749,8 @@ export function attach(
27492749
27502750
const id = instance.id;
27512751
pendingRealUnmountedIDs.push(id);
2752+
2753+
idToDevToolsInstanceMap.delete(instance.id);
27522754
}
27532755
27542756
function getSecondaryEnvironmentName(

0 commit comments

Comments
 (0)