Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#752 SWT Dynamic Chart

open
None
5
2007-05-16
2007-05-09
btavernier
No

In the class SWTGraphics2D, there are 3 TODO on 3 dispose call (in setFont(Font font), setBackGround and setForeGround).

I think that the answer to the question about the need to explicitly call "dispose" is yes.

I'm using JFreeChart in an eclipse view to do some dynamic chart and run out of handle after an amont of time.

With adding some "dispose" calls to the previous methods, I don't.

PS : Thanks for that great lib !

Discussion

  • Henry Proudhon
    Henry Proudhon
    2007-05-16

    • assigned_to: nobody --> nenry
     
  • Henry Proudhon
    Henry Proudhon
    2007-05-16

    Logged In: YES
    user_id=1379312
    Originator: NO

    Hi,

    This has already been discussed on the forum with slient. If you use the last cvs version, two of the TODO have been removed and dispose method added. We create a new Color and dispose the old one each time SetFore/Background is called. For the font, this is more complex since we do not want to dispose a resource if other widget have reference on it. At the moment I'm reviewing the various options. I'm considering adding a font registry where we keep the references of the existing fonts and dispose them when they are not used anymore.

    Thanks for the feedback,

    Henry