I am seeing an issue where an event that is not getting unregistered not shown in profiler
jegray12
Posts: 3 New member
As part of a technical discussion of memory profiling, I purposely added events that were not unregistered in my company's Winforms-WPF application. There was no indication of a memory leak in the profiler. I then wrote a smaller WPF application that just pops up a window. The DataContext of the window has an event that is not getting unregistered...yet I never see instances of the popup window in the memory profiler. I am using VS2019. See attached project.
Tagged:
Answers
I would expect there to be a buildup of PopupWindow instances as I open and close the window, but I see no instances in the profiler.
private void Button_Click(object sender, RoutedEventArgs e)
Without a solution to examine I'm admittedly speculating, based on your description I anticipate the flawed logic you instituted failed to grow sufficiently to meet the required threshold for it to be identified.
https://documentation.red-gate.com/amp/understanding-memory-problems/memory-management-primer
The tooling aims to highlight what is growing excessively, as opposed to what conceptually could.