Project: Birt
Bug 194549 Memory leak in chart device renderers
Reported: 2007-06-27 01:59:52 | Status: resolved fixed

After memory analysis for Chart code, it indicates java.awt.Font objects are not garbage collected. Investigating the renderer code, Graphics2D objects in IDisplayServer and IDeviceRenderer are not disposed after chart rendering finished. Need to invoke IDeviceRenderer.dispose() after ChartReportItemPresentationImpl being finished, and dispose all required resources in that method, including IDisplayServer and anything else.

Files changed in fix:
chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingDisplayServer.java chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingRendererImpl.java chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingTextRenderer.java chart/org.eclipse.birt.chart.device.pdf/src/org/eclipse/birt/chart/device/pdf/PDFRendererImpl.java chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGRendererImpl.java chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGTextRenderer.java chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtTextRenderer.java chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/device/DisplayAdapter.java chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/device/IDisplayServer.java chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/device/ITextRenderer.java chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/device/TextRendererAdapter.java chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemPresentationImpl.java