Bug 194549 Memory leak in chart device renderers
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.
chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtTextRenderer.java
/***********************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * Actuate Corporation - initial API and implementation
 ***********************************************************************/
package org.eclipse.birt.chart.device.swt;
import org.eclipse.birt.chart.computation.BoundingBox;
import org.eclipse.birt.chart.computation.IConstants;
import org.eclipse.birt.chart.computation.Methods;
import org.eclipse.birt.chart.computation.RotatedRectangle;
import org.eclipse.birt.chart.device.IDeviceRenderer;
import org.eclipse.birt.chart.device.IPrimitiveRenderer;
import org.eclipse.birt.chart.device.ITextMetrics;