• No replies
344 Posts

Pinned topic RCP Cleanup code

‏2012-11-29T17:24:05Z |
I've read the InfoCenter on Developing and deploying HATS rich client applications, specifically the HATS rich client considerations and limitations. There is a section that discusses SWT resource leaks when you use the Visual Editor to manualy add SWT font,image, and color resource to HATS transformations and templates.

I need some clarification here. I added a global variable (indexed) to a page. I needed to change the font and color so went to the properties, opened the font popup, scrolled to the Courier New font and selected it. I then went to foreground color, clicked the Named Colors tab and selected Blue. I then saved the transformation. The code generated was


new Font(Display.getDefault(), 
"Courier New", 9, SWT.NORMAL)); gvControl.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));

My question is does this action require me to add the clean up code discussed in the InfoCenter? Since I use standard fonts and colors shown in the studio I expect that I do not need to do anything. However, if I do need to add this can someone give me a better explanation why, and sample code to do this.