| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #723
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 2 - Specific to an operating system |
Subsystem: | WIN32 |
Summary: | GDI leak in Win32 -- suggested fix |
Version: | 1.1.6 |
Created By: | greg.ercolano |
Assigned To: | mike |
Fix Version: | 1.1.7 (SVN: v4041) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | greg.ercolano 10:45 Feb 13, 2005 |
| WRT the thread on fltk.bugs "fltk-1.1.6 continuous GDI memory leak"
In his case he noticed the 'ask.exe' demo leaking a GDI each time a window is created and destroyed.
It would appear that i->region created in Fl_Widget::damage() is indeed not getting destroyed when Fl_Window destructs via Fl_Window::hide().
The problem /appears/ to be here in Fl.cxx.. When I add the noted line and rebuild, ask.exe no longer leaks a GDI.
In 1.1.6 Fl.cxx, the code for Fl_Window::hide(), in the first "#ifdef WIN32", the section reads:
---- #ifdef WIN32 if (ip->private_dc) ReleaseDC(ip->xid,ip->private_dc); if (ip->xid == fl_window && fl_gc) { ReleaseDC(fl_window, fl_gc); fl_window = (HWND)-1; fl_gc = 0; } if ( ip->region ) XDestroyRegion(ip->region); <-- ADD THIS TO FIX #elif defined(__APPLE_QD__) if ( ip->xid == fl_window ) fl_window = 0; #elif defined(__APPLE_QUARTZ__) Fl_X::q_release_context(ip); if ( ip->xid == fl_window ) fl_window = 0; #else if (ip->region) XDestroyRegion(ip->region); #endif ----
| |
|
#2 | mike 03:12 Feb 14, 2005 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |