[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] f0fa4e: Use appropriate function to destroy the currentCur...
Nicolas Cellier
noreply at github.com
Mon Nov 14 20:17:43 UTC 2022
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: f0fa4e3781b5a845d585b7226a05c597ff20feae
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f0fa4e3781b5a845d585b7226a05c597ff20feae
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date: 2022-11-14 (Mon, 14 Nov 2022)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Use appropriate function to destroy the currentCursor in Win32
The currentCursor is either created by CreateCursor() in ioSetCursorWithMask() or by CreateIconIndirect() in ioSetCursorARGB()
Thus it must be destroyed either by DestroyCursor() or by DestroyIcon()
A new global variable currentCursorIsIcon memoize how the currentCursor was created and thus how it must be destroyed
if ever the creation of cursor fails, restore the old cursor rather than letting it be null.
Thus, only destroy the old cursor if the creation of new cursor succeeds.
Commit: e754c98e27c34090c588ddc7eb38f6e420156918
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/e754c98e27c34090c588ddc7eb38f6e420156918
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date: 2022-11-14 (Mon, 14 Nov 2022)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Fixup potential GDI leak in getDpiSystem in win32
A call to GetWindowDC() must be paired with a ReleaseDC().
Fortunately, this function is only used as fallback on old systems, normally getDpiMonitor is used instead.
Commit: d6bc6609244ea40346874a546b6f9244918d9de3
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d6bc6609244ea40346874a546b6f9244918d9de3
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date: 2022-11-14 (Mon, 14 Nov 2022)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Merge pull request #658 from OpenSmalltalk/Fix_GDI_leak
Fix gdi leak
On some win32 configurations and/or with some specific image (presumably when CursorWithAlpha is in use),
we observe a GDI leak : numbers of GDI objects rapidly grow up to 10,000 (about 50 new objects/second).
when the limit is reached, the image hangs and we have to kill it...
With those fixes, the number of GDI objects remains stable at 20.
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/5a9222cd164d...d6bc6609244e
More information about the Vm-dev
mailing list