Hello,
after a large Test (creating more than 1000 charts in an Eclipse plugin) I have figured out a problem using Sleak-PlugIn. There are fonts created in the class but they are not disposed, when the SWTGraphics2D is disposed.
I added two methods which are called from dispose() analog disposeColorPool:
private void disposeFontsPool() {
for (Iterator it = this.fontsPool.values().iterator(); it.hasNext();) {
org.eclipse.swt.graphics.Font resource = (org.eclipse.swt.graphics.Font) it.next();
resource.dispose();
}
this.fontsPool.clear();
}
private void disposeColorPool() {
for (Iterator it = this.colorsPool.values().iterator(); it.hasNext();) {
org.eclipse.swt.graphics.Color resource = (org.eclipse.swt.graphics.Color) it.next();
resource.dispose();
}
this.colorsPool.clear();
}
After that the resources are freeing up. Who is responsible to change the code.
Bye
Martin