Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Re: Possible resource leak?

$
0
0

Jason, thanks for looking into this.

 

Actually I removed that approach, and I replaced with javax.swing.Timer. Originally java.util.Timer was used to introduce a 0.3 seconds delay but that was a mistake when UI change is performed because java.util.Timer creates new threads and timer tasks are accumulating because that code is repeatedly called (inside ContactList.moveToOffline routine) . UI objects may remain linked in there and never garbage collected.

 

The reason for the delay is that In UI the user contact item gets red colour for 0.3 seconds before moving to offline group. In the current codebase (build 624) I just used javax.swingTimer instead of java.util.Timer (no Thread.sleep calls anymore) and kept the 0.3 seconds delay. So there is no change in functionality, just that javax.swing.Timer is recommended because it does not create a new thread, it executes the code in the swing event-dispatch thread (just like invokeLater)

 

I understood from wroot that also the build 624 is locking when network goes off/on. I tested all day the scenario and I reproduced it only once.


Viewing all articles
Browse latest Browse all 11593

Trending Articles