Skip to content

Leak EventHandler #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
calvinhsia opened this issue Jul 24, 2019 · 1 comment
Closed

Leak EventHandler #240

calvinhsia opened this issue Jul 24, 2019 · 1 comment
Labels

Comments

@calvinhsia
Copy link

Analyzing 40 customer dumps

EvHandler EvType PctCabs CabCnt AvgNumEVH MaxNumEVH Notes Link
System.EventHandler GitDiffMargin.Core.MarginCore.BrushesChanged += GitDiffMargin.ViewModel.ScrollDiffViewModel MultipleEventHandlers 1.2 40 277 1596 https://github.com/laurentkempe/GitDiffMargin
System.EventHandler GitDiffMargin.Core.MarginCore.BrushesChanged += GitDiffMargin.ViewModel.EditorDiffViewModel MultipleEventHandlers 1.2 40 277 1596 https://github.com/laurentkempe/GitDiffMargin

The MarginCore publishes a BrushesChanged event, and the ScrollDiffViewModel and the EditorDiffViewModel subscribe and handle the event, but never unsubscribe.
Thus an average of 277 event subscriptions in each VS session (max 1596) occurs.

Versions

  • Git Diff Margin version: ...
  • Visual Studio version: ...

What happened

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Logs

Additional context

@calvinhsia calvinhsia added the bug label Jul 24, 2019
@laurentkempe
Copy link
Owner

Thx for the report @calvinhsia I will take a look at it!

laurentkempe added a commit that referenced this issue Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants