Quantcast
Viewing all articles
Browse latest Browse all 11593

Re: Possible resource leak?

@Mircea

 

Hmm... looking at some of the recent commits in ContactList.java -- I think we're ok with SwingUtilities.invokeLater() since it internally calls out to EventQueue.invokeLater(), so they are the same basically.

 

Wondering if there is a timing problem here? The code that was replaced seemed to wait some seconds before it ran it's routine, but the invokeLater() i think just runs when the queue gets to it... so no guaruntee of time passing after the object is passed into the queue, and when it actually gets executed. Perhaps there's not much in the queue at that point, and the code is getting run too quickly upon sleep resume?

 

I think that may be why the Thread.sleep() was tried? If we need to delay execution, maybe ScheduledExecutorService would help?


Viewing all articles
Browse latest Browse all 11593

Trending Articles