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

createImage and OutOfMemory problems  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a component that contains an image.
then, I make repeated calls to component.createImage. After 40 iterations, a test application gets an OutOfMemoryError within the java.awt.image class. How can I prevent the memory from begin eaten up by successive calls to createImage? I have tried image.flush() and Runtime.getRuntime().gc() but it didn't work. Any help would be appreciated.
 
cata lin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try to increase the initial and maximum heap of the JVM.
Try java -X on jdk to see more.
Cheers,
cata Lin.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!