Menu

#21 Color objects are created but never disposed

none
closed-fixed
None (23)
5
2010-10-01
2009-04-02
jfirechief
No

DO NOT EDIT OR ANSWER THIS ISSUE. SEE THE ORIGINAL ISSUE INSTEAD:
https://www.jfire.org/modules/bugs/view.php?id=1058
ORIGINAL REPORTER: marco

The method ImageUtil.createColorImage(java.awt.Color, int, int) causes instances of org.eclipse.swt.graphics.Color to be created on the fly and to never be disposed.

Discussion

  • jfirechief

    jfirechief - 2009-04-02
    • labels: --> None
    • milestone: --> none
    • assigned_to: nobody --> nlmarco
    • status: open --> open-fixed
     
  • jfirechief

    jfirechief - 2009-04-02

    ORIGINAL COMMENT BY marco, VIEW IT HERE:
    https://www.jfire.org/modules/bugs/view.php?id=1058

    Unfortunately the SWT Image class doesn't provide an addDisposeListener(...) method. Additionally, it is final and thus doesn't allow overriding the dispose(...) method. Therefore, I implemented a timer in ImageUtil (statically) that checks once in 30 sec which Images have been disposed and then disposes the Color instances belonging to them.

     
  • jfirechief

    jfirechief - 2010-10-01
    • status: open-fixed --> closed-fixed
     
  • jfirechief

    jfirechief - 2010-10-01

    ORIGINAL COMMENT BY marco, VIEW IT HERE:
    https://www.jfire.org/modules/bugs/view.php?id=1058

    Unfortunately the SWT Image class doesn't provide an addDisposeListener(...) method. Additionally, it is final and thus doesn't allow overriding the dispose(...) method. Therefore, I implemented a timer in ImageUtil (statically) that checks once in 30 sec which Images have been disposed and then disposes the Color instances belonging to them.

     

Log in to post a comment.

MongoDB Logo MongoDB