Skip to content

Memory leak #185

Description

@Moriropi

Hi,

A component uses :

@implements IAsyncDisposable

<StandaloneCodeEditor ConstructionOptions="GetEditorOptions" @ref="_editor"/>

@code {

     public async ValueTask DisposeAsync()
     {
          Console.WriteLine("dispose");
          
          await _editor.DisposeEditor();

          _editor.Dispose(); // Is it usefull ?
     }

}

When switching pages the component is destroyed with DisposeAsync.

When switching to the same page the component is recreated.

The following javascript is called when the component has been created :

const editors = window.blazorMonaco.editors;
    
    console.log("Number of editor = ", editors.length);
    
    console.log("Editors = ", editors);

The number of editor keep growing up everytime the component is created.

Expected : editor free within javascript when using _editor.DisposeEditor()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions