Commit 6975bad
committed
Dispose bold/italic fonts in FontRegistry upon display disposal
The FontRegistry implementation uses hooks to dispose registered fonts
upon disposal of the display they have been created for. This
implementation does, however, only cover the base fonts but not the
bold/italic versions of them. In case only a bold/italic font of a
record is created on a separate display, no dispose hook for that
display will be created, such that those fonts will not be disposed when
the display becomes disposed. In consequence, fonts for non-disposed
devices may be returned by the registry.
This change improves the FontRegistry implementation to create a display
dispose hook also upon creation of a bold/italic font.1 parent e6d3cbf commit 6975bad
2 files changed
Lines changed: 44 additions & 9 deletions
File tree
- bundles/org.eclipse.jface/src/org/eclipse/jface/resource
- tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/resources
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
492 | | - | |
| 494 | + | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
| |||
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
512 | 522 | | |
513 | 523 | | |
514 | 524 | | |
| |||
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
61 | 86 | | |
62 | | - | |
| 87 | + | |
63 | 88 | | |
64 | | - | |
| 89 | + | |
65 | 90 | | |
66 | 91 | | |
67 | 92 | | |
| |||
70 | 95 | | |
71 | 96 | | |
72 | 97 | | |
73 | | - | |
| 98 | + | |
74 | 99 | | |
75 | 100 | | |
76 | 101 | | |
| |||
0 commit comments