I noted someone reporting performance problems with my application and I think I've narrowed it down to a GDI leak that happens when opening and closing chromeless windows.
Use Microsoft's performance HUD or any debug tool that shows GDI DC objects and just open/close Chromeless Windows over and over again. I happen to use the Native Windows Chrome setting but I think it's happening no matter what.
I'll attack a screenshot. The HUD tool suggests it might be happening in the DPI calculation code. Note that in the screenshot the GDI DC count of 11 outstanding is what keeps going up every time I open/close.
Unless there's something special to do for cleaning up ChromelessWindow objects? I just call .Close() and set my instance to null.
We are currently working on your reported query, and we need some more time to validate the issue on our end. So, we’ll provide further details on November 10, 2022. We appreciate your patience until then.
Also, I have one more bit of info to add. I tried a workaround where I create one ChromelessWindow and just set it to Visible/Hidden as needed but I still have a problem whenever I change the Height or Width attributes. Some property listener in ChromelessWindow sees the Height change and calls the DPI code and leaks something.
So, I guess add that to the list of things to try. Add a button that just does Height = Height + 5.0; whenever it's clicked or something like that.
Here's one more screenshot that might be helpful. I've also noticed that simply moving a chromeless window has this problem as well. The number of handles grows pretty fast by just creating a basic window and moving it around. It seems kinda bad.
We are able to see this GDI leaks on our end. Still analyzing on this issue in control level with high priority and will provide complete details on November 21, 2022. We appreciate your patience until then.
We have confirmed the “GDI Leak issue in ChromelessWindow” as an issue and logged bug feedback. We will include the fix for the reported issue on December 9, 2022. We appreciate your patience until then. We will let you know once it gets rolled out.
You can track the status of this defect using the following feedback link:
If you have any more specifications or a scenario to be tested, you can add them as a comment in the portal.