Issue #345 allow double dispose of GLTarget
Change-Id: Ib433557f82bc0bc63fb537814bad47eab00be2be Former-commit-id:13ecc7e4ea
[formerlyb776d953d7
] [formerly06c9d4cdcf
] [formerly13ecc7e4ea
[formerlyb776d953d7
] [formerly06c9d4cdcf
] [formerly55aa66a510
[formerly06c9d4cdcf
[formerly 8b906b245fd927ed79825b00dfba456a1c327fbb]]]] Former-commit-id:55aa66a510
Former-commit-id:e99e823ca8
[formerlyc3d3142bab
] [formerly caf20037931a8dff74e314931dddc204682bcdf7 [formerly5d6b036ed7
]] Former-commit-id: 6fee95c5b888e0fa8f9b2d7a97de873918e1fe3b [formerly8f34946969
] Former-commit-id:16d205ce9d
This commit is contained in:
parent
5e8b286356
commit
1ab0935d7e
1 changed files with 5 additions and 2 deletions
|
@ -559,17 +559,20 @@ public class GLTarget implements IGLTarget {
|
|||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
theContext.makeContextCurrent();
|
||||
|
||||
if (defaultFont != null) {
|
||||
defaultFont.disposeInternal();
|
||||
defaultFont = null;
|
||||
}
|
||||
if (colorbarFont != null) {
|
||||
colorbarFont.disposeInternal();
|
||||
colorbarFont = null;
|
||||
}
|
||||
|
||||
theContext.releaseContext();
|
||||
theContext.destroyContext();
|
||||
|
||||
if (theCanvas != null && theCanvas.isDisposed() == false) {
|
||||
|
||||
theCanvas.removeListener(SWT.Resize, this.canvasResizeListener);
|
||||
}
|
||||
lastColormapUsed = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue