Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / October 2006

Tip: Looking for answers? Try searching our database.

Minimizing a JFrame releases memory? Why?

Thread view: 
eitan - 29 Oct 2006 13:08 GMT
Why when setting the extendedState of a JFrame to Frame.ICONIFIED
release memory?

I have a Swing telephone application when runing on normal state it
uses aprox 40 MB if I minimize calling
JFrame.setExtendedState(Frame.ICONIFIED) I can see it releases a lot of
memory, using only 5 MB.
My problem is after being a long time minimized (several hours) and I
restore the application (i.e: a call is received) I takes close to half
a minutes the application to appears on foreground!

Why is this happening? Can anyone help me to understand what's going on
the virtual machine or which resources are being release while using
the Frame.ICONIFIED  flag?
Thanks  E.
Daniel Pitts - 30 Oct 2006 02:38 GMT
> Why when setting the extendedState of a JFrame to Frame.ICONIFIED
> release memory?
[quoted text clipped - 11 lines]
> the Frame.ICONIFIED  flag?
>  Thanks  E.

The truth of the matter is that this has more to do with your OS than
anything.  Java doesn't release memory it is using, the OS probably has
a paging cache, and determined that a specific set of memory isn't
being used, so it eventually gets bumped out of the cache by things
that ARE using memory.

This isn't unique to Java.  I find that if I leave Firefox minimized on
Windows XP for long periods of time, it too will take a while to regain
composure.  Even if I don't have it minimized, but just walk away, it
can take some time again.

Hope this helps.
- Daniel.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.