By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.


P: n/a
I get an interesting question. I program an MDI that each
JInternalFrame will show an image of 1700x1500. I limit that 2
JInteralFrames (and thus 2 images) can be opened at most. When users
try to open third image, the JInternalFrame on top will be replaced
with the new image.
a) I open 2 images (thus show 2 JInternalFrame). Then when I try to
open third image, the image on top is replaced and there is no
b) I open 2 images and close the top one. Then I open the same image
again. Then I try to open third image. The image on top, again, is
replaced and there is no java.lang.outofmemory.
c) repeat step b) and I close and open second image and further open
third image repeatedly. No java.lang.outofmemory.
d) I open 2 images. Close them all. Then open the same 2 images and
try to open third image. java.lang.outofmemory occurs.

It is strange since if the "close" operation cannot release memory,
then step c) should fail after open and close repeatedly. Even if the
"close" operation does not work, step c) will build more garbage
(after several open/close) than step d).

Any idea?
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.