Repository navigation
fix: menu items not cleaned up after rebuild - #50831
Merged
codebytere merged 1 commit intoApr 9, 2026
Merged
codebytere merged 1 commit into
codebytere merged 1 commit into
Conversation
Menu was holding a SelfKeepAlive to itself from construction, so any Menu that was never opened (e.g. an application menu replaced before being shown) stayed pinned in cppgc forever. Repeated calls to Menu.setApplicationMenu leaked every prior Menu along with its model and items. Restore the original Pin/Unpin lifecycle: start keep_alive_ empty and only assign `this` in OnMenuWillShow. OnMenuWillClose already clears it. Co-authored-by: Shelley Vohr <[email protected]>
4 tasks done
codebytere
approved these changes
Apr 9, 2026
codebytere
deleted the
trop/40-x-y-bp-fix-menu-items-not-cleaned-up-after-rebuild-1775703408548
branch
April 9, 2026 08:48
|
Release Notes Persisted
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #50806
See that PR for details.
Notes: Fixed a memory leak where Menu items were not cleaned up after Menu.setApplicationMenu was called repeatedly.