[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 1369b7: Fix #659

Eliot Miranda noreply at github.com
Tue Nov 15 16:09:43 UTC 2022

  Branch: refs/heads/virtend
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 1369b73c6beaedb8513fb9ea446f8ab43fbf99af
  Author: Tobias Pape <tobias at netshed.de>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c

  Log Message:
  Fix #659

  Commit: 28b073f31e2767f14f54bf792a8f02016f0f65a1
  Author: Eliot Miranda <eliot.miranda at gmail.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M platforms/win32/vm/sqWin32Window.c

  Log Message:
  Manually cherry-pick

commit d6bc6609244ea40346874a546b6f9244918d9de3
Merge: 5a9222c e754c98
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date:   Mon Nov 14 21:17:30 2022 +0100

    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.

commit e754c98e27c34090c588ddc7eb38f6e420156918
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date:   Mon Nov 14 15:06:48 2022 +0100

    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 f0fa4e3781b5a845d585b7226a05c597ff20feae
Author: Nicolas Cellier <nicolas.cellier at sirehna.com>
Date:   Mon Nov 14 14:59:50 2022 +0100

    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.

Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/fdc5fd6cd979...28b073f31e27

More information about the Vm-dev mailing list