Skip to content

Adding x:Shared="False" to MahApps.TextBox.ContextMenu - #3990

Merged
punker76 merged 1 commit into
MahApps:developfrom
lipchev:TextBox.ContextMenu_MemoryLeak
Dec 2, 2020
Merged

punker76 merged 1 commit into
MahApps:developfrom
lipchev:TextBox.ContextMenu_MemoryLeak

Conversation

@lipchev

@lipchev lipchev commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

Describe the changes you have made to improve this project

Added x:Shared="False" to the context menu (cut/copy/paste), used for all text-box controls.

Unit test

none

Additional context

There seems to be a lot of confusion about the sharing of context menus on the internet:

  • Look at what Linda is replying to Bill Gates II here
  • Here they explicitly show x:Shared="true"

My guess is that it probably has to do with something in the style- as it the leak doesn't grow up in instances, it's one per control type (I think).
Either that or it's the shared RoutedCommands (can there be a problem with those being shared!?)

If anyone understands the root cause here, I'd be curious to know..

Closed Issues

Closes #3989

@punker76 punker76 added this to the 2.4.2 milestone Dec 2, 2020
@punker76
punker76 merged commit 1d9e6e2 into MahApps:develop Dec 2, 2020
@punker76

punker76 commented Dec 2, 2020

Copy link
Copy Markdown
Member

@lipchev thx again! your changes have been merged, thanks for your contribution πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Memory Leak with MahApps.TextBox.ContextMenu

2 participants