GDI Solid Brushes
Jon Griffiths
jon_p_griffiths at yahoo.com
Fri Aug 20 08:10:38 CDT 2004
Hi,
from
http://msdn.microsoft.com/msdnmag/issues/01/03/leaks/default.aspx:
"One reason might be that the solid brush is in fact a stock object,
since its handle has the same value as returned by a
GetStockObject(BLACK_BRUSH) call."
It would seem that requests for solid color brushes should be
mapped to GetStockObject() where possible . The app I'm working on
here doesn't free its solid white/black brushes, yet doesn't leak
under windows.
Attached patch implements this and documents the brush functions.
I'll send a test case shortly.
Regards,
Jon
Changelog;
+dlls/gdi/brush.c
Return a stock brush when asking for a brush with the same
characteristics, as per native. Document the brush functions.
=====
"Don't wait for the seas to part, or messiahs to come;
Don't you sit around and waste this chance..." - Live
jon_p_griffiths at yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brush.diff
Type: text/x-diff
Size: 8788 bytes
Desc: brush.diff
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040820/69a01705/brush.bin
More information about the wine-patches
mailing list