Hi, On Tue, 2005-07-26 at 12:16 -0400, Thomas Fitzsimmons wrote: > On Tue, 2005-07-26 at 07:48 +0200, Mark Wielaard wrote: > > > I don't think you want to create a (non-daemon) Timer each and every > > time here. That means that on each repaint() a new Thread is created > > which is never destroyed and which will prevent the application to ever > > stop since the Timers will be live. Try to either create a reusable > > (daemon) Timer that is used for all repaints. And/Or add a TimerTask to > > cancel the Timer after it hasn't been used for a while. > > OK, committed the attached patch. > > --- gnu/java/awt/peer/gtk/GtkComponentPeer.java 26 Jul 2005 01:53:24 > +++ gnu/java/awt/peer/gtk/GtkComponentPeer.java 26 Jul 2005 16:13:35 > @@ -85,6 +85,8 @@ > > boolean isInRepaint; > > + Timer repaintTimer = new Timer();
Are you sure you want a non-daemon Timer here? Wouldn't that prevent the application from shutting down when the last AWT thread dies? Cheers, Mark
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
