[jbosstools-issues] [JBoss JIRA] (JBIDE-10221) Resorce leak problems in JBossTools

Yahor Radtsevich (Commented) (JIRA) jira-events at lists.jboss.org
Fri Nov 25 10:01:42 EST 2011


    [ https://issues.jboss.org/browse/JBIDE-10221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645646#comment-12645646 ] 

Yahor Radtsevich commented on JBIDE-10221:
------------------------------------------

I have created a method for automatic disposing of SWT graphic Resources (images, cursors, GCs etc.): *org.jboss.tools.common.util.SwtUtil.bindDisposal(Resource resource, Widget widget)*. It binds disposal of resource to disposal of widget.


An example demonstrating how to use it: 
{code:java}
// here SWT Tree is created
Color treeBackgroundColor = new Color(null, 0xff, 0xff, 0xcd);
tree.setBackground(treeBackgroundColor);
SwtUtil.bindDisposal(treeBackgroundColor, tree);
// The treeBackgroundColor object will be disposed automatically on tree.dispose()
{code}
                
> Resorce leak problems in JBossTools
> -----------------------------------
>
>                 Key: JBIDE-10221
>                 URL: https://issues.jboss.org/browse/JBIDE-10221
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Cleanup
>    Affects Versions: 3.3.0.M4
>            Reporter: Vitali Yemialyanchyk
>            Assignee: Max Rydahl Andersen
>         Attachments: screenshot-1.jpg
>
>
> I've find several places in several components, which I've check - I'll create separate issues for this. There is a chance what there are leak in other components, which I did not inspect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list