Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread seems not dead!

 
mitchell jagd
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does my applet, which runs a thread, runner slower and slower upon a repetetive opening of the page on which it is embedded. It also affects the speed of all other operations of the browser. Thus when open and closed for the fifth time the browser is almost at a standstill (page with applet is closed!). Other applets without threads do not show such behavior. I have inclosed a destroy() for the thread in the applets stop()-method, but this does not help.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that you should be calling destroy()... that is for the JVM to call when it's cleaning up. For a quick fix change destroy() to stop()... it's deprecated, but should work OK for what you are doing. For the 'preferred' way of doing things, do something like this...



-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic