Skip to content

fix: Memory leak in FluentSelect component #3799

Open
@jamesminchin

Description

@jamesminchin

🐛 Bug Report

I am experiencing a memory leak issue with FluentSelect. I have a FluentSelect within a component on a page. Each time I change the component parameters the browser memory usage increases, and it does not go down again.

💻 Repro or Code Sample

BlazorMemory.zip

Run the attached project. Open the Browser task manager, view the memory for the project. Repeatedly click the Next button on the web page (e.g. hold down enter key) and observe number on the page changing, and the browser memory used keeps increasing. After a few hundred presses the memory has increased by hundreds of megabytes, and does not go down again.

In the Student.razor page I have also included a commented out section using InputSelect. If that is enabled instead of FluentSelect you can see the memory issue does not occur.

🤔 Expected Behavior

Memory used should not keep increasing without limit.

😯 Current Behavior

Memory used increases each time the component parameters change, and never decreases or stabilises.

💁 Possible Solution

I do not know the cause.

🔦 Context

This is used in a production site and is causing the browser to slow down and eventually crash.

🌍 Your Environment

  • Windows 11
  • Microsoft Edge
  • .Net 8
  • Fluent UI 4.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions