Skip to content

[Windows] Fix memory leak w/ main window#24176

Merged
rmarinho merged 1 commit into
mainfrom
foda/windowleak
Aug 13, 2024
Merged

[Windows] Fix memory leak w/ main window#24176
rmarinho merged 1 commit into
mainfrom
foda/windowleak

Conversation

@Foda
Copy link
Copy Markdown
Contributor

@Foda Foda commented Aug 12, 2024

Description of Change

Fix memory leak w/ main window by unsubscribing to events.

Issues Fixed

Fixes #24102

@Foda Foda added platform/windows perf/memory-leak 💦 Memory usage grows / objects live forever (sub: perf) labels Aug 12, 2024
@Foda Foda requested a review from a team as a code owner August 12, 2024 22:22
@Foda Foda changed the title Fix memory leak w/ main window [Windows] Fix memory leak w/ main window Aug 12, 2024
{
OnClosed(sender, args);

Activated -= OnActivated;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a bunch of trial and error, this was the solution to getting the weak reference to be marked not-alive.

@jingliancui
Copy link
Copy Markdown
Contributor

hi, if this fix pass this issue sample app? #24140

@rmarinho rmarinho merged commit 7d55d06 into main Aug 13, 2024
@rmarinho rmarinho deleted the foda/windowleak branch August 13, 2024 10:09
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Aug 27, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.1.24453.9 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Sep 20, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-9.0.0-rc.1.24453.9 perf/memory-leak 💦 Memory usage grows / objects live forever (sub: perf) platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] MauiWinUIWindow leak

5 participants