[
https://issues.jboss.org/browse/JBIDE-10228?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich commented on JBIDE-10228:
-----------------------------------------------
I think this method should not dispose image at all. It is public, so that other clients
may call it with images managed elsewhere. This dialog is creating 414 new images at the
start and then 138 new images each time color attribute is clicked. The images are
disposed afterwards, but it is better to create once 138 images for named colors, register
them in the image registry, and then reuse.
org.jboss.tools.jst.css.dialog.widgets.ImageCombo has incorrect logik
with Image dispose
----------------------------------------------------------------------------------------
Key: JBIDE-10228
URL:
https://issues.jboss.org/browse/JBIDE-10228
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: common/jst/core
Affects Versions: 3.3.0.M4
Reporter: Vitali Yemialyanchyk
Assignee: Viacheslav Kabanovich
Fix For: 3.3.0.Beta1
Attachments: jbide-10228.patch
line 226:
{code}
public void add(String string, Image image) {
...
if (image != null) {
newItem.setImage(image); <-----------
here you get image if it not null
}
newItem.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
TableItem item = (TableItem) e.getSource();
item.getImage().dispose(); <-----------
here you dispose image in any case
}
});
...
{code}
--
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