Skip to content

[BUG] MediaElement is not currently being Garbage Collected #1702

@marco-skizza

Description

@marco-skizza

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

As it seems, the MediaElement doesn't ever get Garbage Collected.

Expected Behavior

The MediaElement should get Garbage Collected eventually, and with it the containing page.

Steps To Reproduce

  • Run the sample
  • Click the button to get to the page with the MediaElement and navigate back
  • Do this several times
  • In the Debug console observe, that ~MyPage() never gets called

Link to public reproduction project repository

https://github.com/marco-skizza/CommunityMauiMediaElement

Environment

- CommunityToolkit.Maui.MediaElement: 3.0.1
- OS: iPadOS 17.3.1 on an iPad mini 6
- .NET MAUI: 8.0.6

Anything else?

Thanks for looking at this!

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