[
https://issues.jboss.org/browse/JBIDE-10228?page=com.atlassian.jira.plugi...
]
Vitali Yemialyanchyk commented on JBIDE-10228:
----------------------------------------------
I do not sure is this comment to this issue or may be some other from JBIDE-10221 list...
in general patch, which Victor propose is something, which I expected in this case. One
note: it whould be nice to obey the rule "where you create a resource, there
dispose". So may be possible somehow change the logic, I have no sources at this
moment, so can not propose something better.
About image numbers... if you wrote about this case, cause I did not dig into details.
414 new images and 138 images - it is a really big number of resources to allocate for and
store for a long Eclipse run session to get "No more handlers" exception. There
are concret recomendations in SWT documentation about it. As I remember I saw such
recommendations, but can not post a link - will try to find it tomorrow. Only few number
of really useful images should be in plugin storage, others should be dispoused after it
use - this is formulation, which I got from these recommendations...
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