diff --git a/tutorial/extension-tutorial-2/src/org/eclipse/birt/sample/reportitem/rotatedtext/util/SwtGraphicsUtil.java b/tutorial/extension-tutorial-2/src/org/eclipse/birt/sample/reportitem/rotatedtext/util/SwtGraphicsUtil.java index 3c7e6d51546..5d2187960ef 100644 --- a/tutorial/extension-tutorial-2/src/org/eclipse/birt/sample/reportitem/rotatedtext/util/SwtGraphicsUtil.java +++ b/tutorial/extension-tutorial-2/src/org/eclipse/birt/sample/reportitem/rotatedtext/util/SwtGraphicsUtil.java @@ -51,8 +51,9 @@ public static Image createRotatedTextImage(String text, int angle, Font ft) { tl.setFont(ft); } tl.setText(text); - - return createRotatedImage(tl, pt.x, pt.y, angle); + Image im = createRotatedImage(tl, pt.x, pt.y, angle); + tl.dispose(); + return im; } catch (Exception e) { e.printStackTrace();