After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 364594 - resource leak when drawing expander with ms-windows classic theme
resource leak when drawing expander with ms-windows classic theme
Status: RESOLVED DUPLICATE of bug 364514
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.10.x
Other All
: Normal critical
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-10-24 01:31 UTC by Hiroyuki Yamamoto
Modified: 2006-10-24 01:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hiroyuki Yamamoto 2006-10-24 01:31:36 UTC
Please describe the problem:
In msw_style.c::draw_expander(), a pen object created by CreatePen() is not deleted when classic theme is used. As a result, each time draw_expander() is called, the pen object leaks. This will eventually cause application crash.
This patch fixes it.

--- msw_style.c.orig    Tue Sep 12 20:50:11 2006
+++ msw_style.c Mon Oct 23 16:18:01 2006
@@ -1285,6 +1285,7 @@
                }
 
         SelectObject( dc, old_pen );
+        DeleteObject( pen );
         release_window_dc( style, window, state );
        }


Steps to reproduce:
1. Open the process tab of Task manager, and display GDI object column.
2. Move mouse pointer on a row with expander at GtkTreeView.

Actual results:
GDI object is kept increasing. When the usage of GDI object reaches 10000 (in Windows 2000), the graphic of application collapses, and eventually it crashes.

Expected results:
GDI object keeps the same value.

Does this happen every time?
Yes

Other information:
Comment 1 Dominic Lachowicz 2006-10-24 01:38:01 UTC
This is a duplicate of another bug filed today. Odd. Thanks for the report and the patch, though.

*** This bug has been marked as a duplicate of 364514 ***