Skip to content

Commit 60ca00f

Browse files
committed
[win32] Dynamic handle creation for Path
This commit adapts Path in the win32 implementation to create handles only on demand. If a non-handle specific operation like getBounds() is called, a temporary handle will be created and disposed afterwards if no handle exists already.
1 parent 2974864 commit 60ca00f

File tree

4 files changed

+218
-65
lines changed

4 files changed

+218
-65
lines changed

bundles/org.eclipse.swt/Eclipse SWT Tests/win32/org/eclipse/swt/graphics/PathWin32Tests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void testCreatePathHandleWithDisposedPathInvolved() {
8282
path.addArc(0, 0, 10, 10, 0, 90);
8383

8484
Path path2 = new Path(display);
85-
path.addArc(0, 0, 30, 30, 0, 270);
85+
path2.addArc(0, 0, 30, 30, 0, 270);
8686

8787
path.addPath(path2);
8888

@@ -91,4 +91,5 @@ public void testCreatePathHandleWithDisposedPathInvolved() {
9191
path.getHandle(200);
9292
path.dispose();
9393
}
94+
9495
}

0 commit comments

Comments
 (0)