Maui: [BUG] [Android]memory leak when "recursively" calling ShowPopup?

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

When recursively calling ShowPopup, memory continues to increase, and even frequent ‘GC.Collect’ will not improve. The running speed slows down until ANR occurs

PS; It’s not true recursion, Implementing recursive operations through delayed asynchronous calls

Expected Behavior

Normal

Steps To Reproduce

Open MauiComm-IssuePopupLeak\MauiComm-IssuePopupLeak.sln Click ‘Show’

Link to public reproduction project repository

https://github.com/BaY1251/MauiComm-IssuePopupLeak.git

Environment

- .NET MAUI CommunityToolkit:7.0.1
- OS:Android7.1
- .NET MAUI:8.0.6

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

PS: Alerts.Toast also has the same problem, I solved it using Android native. Android.Widget.Toast.MakeText("...").Show()