Wrap up -Re: Question: OutOfMemoryError# Java - 爪哇娇娃
g*y
1 楼
Thanks all your guys' help!
Finally I dig it out: in MediaTracker.addImage(Image, int), I add a constant 0
as image ID, and waitForID(0) every time.
Somehow, JVM messed up there and can't release the resources even I request
Image.flush().
Now I change it to addImage(image, m_counter), and waitForID(m_counter), plus
that Image.flush(). JVM release graphics resources now.
Finally I dig it out: in MediaTracker.addImage(Image, int), I add a constant 0
as image ID, and waitForID(0) every time.
Somehow, JVM messed up there and can't release the resources even I request
Image.flush().
Now I change it to addImage(image, m_counter), and waitForID(m_counter), plus
that Image.flush(). JVM release graphics resources now.