Skip to content

Tabster causes memory leak in projection popout window #22291

@JiuqingSong

Description

@JiuqingSong

Environment Information

  • Package version(s): 9.0.0-beta4
  • Browser and OS versions: Chrome 100, Windows 11

Please provide a reproduction of the bug in a codepen:

Some components call useTabster (https://github.com/microsoft/fluentui/blob/ed2d7c8d638535c89e24e3c3de3534c4fae30172/packages/react-tabster/src/hooks/useTabster.ts) which will create a new instance of Tabster if the component is rendered in a projection popout window (a child window which shares the same javascript code with current one), and Tabster has a reference to the child window. But Tabster.dispose() is never called, so that even child window is closed, those objects are still in memory and can't be collected.

This causes detached Window object and a huge amount of related object retain in memory after close popout. I tried the code below as a workaround and call it before close a window, and it works:

image

Actual behavior:

Tabster causes memory leak in popout window.

Expected behavior:

Tabster should be disposed when child window is closed

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions