5 Replies Latest reply on Feb 11, 2013 8:20 AM by Kayaman

    How do I flush sun.swing.CachedPainter?

      In my applet, I populate a very large JTextArea. It gets opened in a JTabbedPane. When the user closes the tab, I remove the JTextArea.

      BUT... After removing it, I get a huge lingering object in memory called sun.swing.CachedPainter.

      Here is pic of lingering object taken in YourKit:
      <img src="http://www.printdesktop.com/Oracle/CachedPainter.gif">

      After about 10 minutes, the memory gets cleared; forcing garbage collection myself does not clear the memory. Somehow the cache is flushed without programmer intervention. I would like to forcefully flush the cache if possible.

      Edited by: ForceRs on Feb 6, 2013 4:18 PM - Trying to get image to show inline...