Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I guess I'm doing sth wrong...  RSS feed

 
Michael Mas
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write and run on my PC a Java program that loads jpg images using BufferedImage and pixel grabber , I change some pixel values, I draw some lines and a histogram ...nothing special. The problem is that now both the computers I work on, after a couple of weeks programming, are getting REALLY slow even when I dont run Java and Im just trying to open word documents or sth similarly simple...
I guess Im doing sth wrong with memory allocation ...
Are there any simple lines that I should add to my code in order to balance the situation..?

Thank you very much
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does everything speed back up after a reboot?
Does your system performance monitor show anything suspicious? (On Windows this would be the Windows Task Manager.) Look for memory allocated to your Java program increasing over time.
Are you sure that you are dispose()-ing every Graphics object?
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!