Problem with GC, Color & Font objects in TChart
Posted: Wed Sep 08, 2010 1:30 pm
Hello,
We used SLEAK to capture the non-disposed Resources.
1. started your Graph and keept it running for some time
2. created a snapshot from the current SWT-Resources by SLEAK
3. called chart.dispose() Method
4. Created a snapshot again and compared the differences
we found there are lot of GC objects,Font objects and color objects are existing in memory.
I think after creating new GC,old GC reference should be made null.For Color and Font It's better to access from registries.
Below stack trace is about GC object creation
at com.steema.teechart.TChart.prepareGraphics(TChart.java:1187)
at com.steema.teechart.TChart.processMouseMotionEvent(TChart.java:1225).
I think these non disposed resources will lead to performance issues.Is there any way to improve performance by disposing above objects.
Advance thanks for your reply.
Thanks,
Vijaya Raghava Rao
We used SLEAK to capture the non-disposed Resources.
1. started your Graph and keept it running for some time
2. created a snapshot from the current SWT-Resources by SLEAK
3. called chart.dispose() Method
4. Created a snapshot again and compared the differences
we found there are lot of GC objects,Font objects and color objects are existing in memory.
I think after creating new GC,old GC reference should be made null.For Color and Font It's better to access from registries.
Below stack trace is about GC object creation
at com.steema.teechart.TChart.prepareGraphics(TChart.java:1187)
at com.steema.teechart.TChart.processMouseMotionEvent(TChart.java:1225).
I think these non disposed resources will lead to performance issues.Is there any way to improve performance by disposing above objects.
Advance thanks for your reply.
Thanks,
Vijaya Raghava Rao