Commit 07c8e20
committed
Fix Resource leak tracking issue on Windows
On Windows, SWT resources supporting multiple zoom levels are registered
via Device.registerResourceWithZoomSupport(), which retains strong
references to these resources. This prevents garbage collection and
breaks leak detection using Cleaner. Switching to use WeakReference to
allow proper GC behavior and enable the resource tracker to report
non-disposed resources correctly.
Fixes: #23351 parent 3bfde61 commit 07c8e20
File tree
1 file changed
+15
-4
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
1 file changed
+15
-4
lines changedLines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
964 | 965 | | |
965 | 966 | | |
966 | 967 | | |
967 | | - | |
| 968 | + | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
971 | | - | |
| 972 | + | |
972 | 973 | | |
973 | 974 | | |
974 | 975 | | |
| |||
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
985 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
986 | 997 | | |
987 | 998 | | |
988 | 999 | | |
| |||
0 commit comments