[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: RepaintManager fix
From: |
Roman Kennke |
Subject: |
Re: [cp-patches] FYI: RepaintManager fix |
Date: |
Mon, 21 Nov 2005 17:36:22 +0100 |
I forgot the patch. Here it comes now.
/Roman
Am Montag, den 21.11.2005, 15:02 +0100 schrieb Roman Kennke:
> Am Samstag, den 19.11.2005, 19:09 +0100 schrieb Mark Wielaard:
> > Hi Roman,
> >
> > On Mon, 2005-11-14 at 12:52 +0000, Roman Kennke wrote:
> > > + /**
> > > + * The current repaint managers, indexed by their ThreadGroups.
> > > + */
> > > + static HashMap currentRepaintManagers;
> >
> > Isn't this a potential memory leak? Maybe there are not many
> > ThreadGroups in an application ever. But it might be wise to use a
> > WeakHashMap here so that the entry disappears when the ThreadGroup is
> > garbage collected.
>
> This is fixed using the attached patch.
>
> 2005-11-21 Roman Kennke <address@hidden>
>
> * javax/swing/RepaintManager.java
> (currentRepaintManagers): Use a WeakHashMap to avoid potential
> memory leak.
> (currentManager): Instantiate WeakHashMap instead of HashMap.
> (setCurrentManager): Instantiate WeakHashMap instead of HashMap.
>
> /Roman
>
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
patch.diff
Description: Text Data
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil