We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Possible GDI object leak

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.

Attachment: GDILeak_1a18970c.zip

6 Replies

SA Sulthan Amanu Syncfusion Team November 3, 2022 10:51 AM

Hi Jhon,

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.


Sulthan Amanu

JO John November 3, 2022 11:54 AM

Ok thanks.

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.

JO John November 3, 2022 11:24 PM

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.

Attachment: GDIExample_d0819405.zip

KS Kayalvizhi Sivashanmugam Syncfusion Team November 11, 2022 11:01 AM

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.

JO John November 11, 2022 06:46 PM


KS Kayalvizhi Sivashanmugam Syncfusion Team November 25, 2022 04:39 AM

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.

Live Chat Icon For mobile
Up arrow icon