GNOME Bugzilla – Bug 364594
resource leak when drawing expander with ms-windows classic theme
Last modified: 2006-10-24 01:38:01 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:
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 ***