Commit 8b591c8
committed
Refactor Cursor handle management to eliminate leaks and support per-zoom handles
- Removed the dedicated `handle` field from Cursor; all native handles are now stored in `zoomLevelToHandle`.
- Extracted OS handle creation logic from constructors into a lazy-loading mechanism triggered by `win32_getHandle`.
- Ensured the default zoom level (100) handle is always created during cursor construction.
- Updated hashCode, equals, isDisposed, and destroy to work with zoom-level handles.
- Prevents resource leaks caused by undisposed temporary cursors and supports safe, reusable handle management across zoom levels.1 parent 13934ee commit 8b591c8
2 files changed
Lines changed: 187 additions & 134 deletions
File tree
- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
0 commit comments