Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-10221 Resorce leak problems in JBossTools
  3. JBIDE-10228

org.jboss.tools.jst.css.dialog.widgets.ImageCombo has incorrect logik with Image dispose

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.0.M4
    • Fix Version/s: 3.3.0.M5
    • Component/s: common
    • Labels:
      None

      Description

      line 226:

      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
                      }
                  });
      ...
      

        Attachments

          Activity

            People

            Assignee:
            scabanovich Viacheslav Kabanovich (Inactive)
            Reporter:
            vyemialyanchyk Vitali Yemialyanchyk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: