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.pdf/src/org/eclipse/birt/chart/device/pdf/PDFRendererImpl.java
/**
	 * Serializes a <code>Document</code> object to a <code>String</code> in XML format. 
	 * This is a convevience method to save the output of the SVG generator to a string.
	 * 
	 * @param generatedDocument the generated graphic
	 * @return String the XML-serialized form of the <code>Document</code>
	 * @throws SVGGeneratorException If XML serialization failed
	 */	
	protected String serializeGeneratedDocumentToString(Document generatedDocument) throws Exception {
		if (generatedDocument == null) {
			return null;
		}
		OutputStreamWriter writer = null;
		ByteArrayOutputStream stream = new ByteArrayOutputStream();
		writer = new OutputStreamWriter(stream, "UTF-8"); 
        DOMSource source = new DOMSource(generatedDocument);
        StreamResult result = new StreamResult(writer);
			
        TransformerFactory transFactory = 
	                                 TransformerFactory.newInstance();
        Transformer transformer = transFactory.newTransformer();
        transformer.transform(source, result);		
										
		return stream.toString();
		
	}        
    
}