| Resource Leak CSSSWTFontHelper, CSSSWTColorHelper [message #1618891]
||Mon, 16 February 2015 07:39
| Stefan Weiser
Registered: February 2012
I detected (with Sleak) a resource problem in the CSS Engine.
FontData oldFontData, Display display)
A new font gets created, but not shared or disposed again. Similar is the situation here:
CSSSWTColorHelper.getSWTColor(CSSValue value, Display display)
For each control of the same instance the font is created again and consumes resources of the OS. I expected that the CSS-Engine uses a resource manager or a registry (ColorRegistry, FontRegistry) to handle the resources of SWT.
Is there anything I have to notice when using the CSS Engine? Is there a way to handle this problem? Resource leaks are a big problem in this case.
Edit: I uploaded a plugin with 2 themes, which shows the problem. Starting the product also starts Sleak. When switching between the 2 themes, you will see that the CSSEngine alsways creates new Fonts and does not release them again.
[Updated on: Mon, 16 February 2015 08:38]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02189 seconds