Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2713
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: finding memory requir |
| Message-ID | <vvydnVSfwN-JtrbanZ2dnUVZ_tajnZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <7a9c7562b7810@uwe> |
| Date | 2011-04-27 15:40 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Andrew Thompson wrote: > kkrish wrote: > .. >> I have an application in Java Swing that has around 40 >> Jpanels > > Did you mean javax.swing.JPanel?** > > I am unfamiliar with any 'Jpanel' or 'Jpanels'. > Limit the memory, until it runs out, for a rough idea. > Also, jconsole that comes with the SDK, offers a > basic view into the memory used by an app. >> ..I want ton find the amount of RAM the >> application requires to run and also the memory requirement of each >> JPanel and its components. How to find the memory requirement? > > * How long is a piece of string? > A lot of this depends on the size of the images. Memory requirements for objects can vary widely, depending on what the optimizer does. In certain cases objects can be inlined and optimized out of existence altogether. >> How can I make sure that the application will never run out of memory >> (out of memory exception )? The best way is to follow good memory-allocation practices. Limit the scope of variables and the lifetime of objects to just what's needed. Let variables go out of scope, and objects to which they refer become eligible for garbage collection (GC). Unless, of course, something else such as a Collection still holds that reference. > What is an 'out of memory exception'? I've struck > 'OutOfMemoryError's** in applications before, but I > have never seen one of those. > > ** This is programming, so please be very specific > and accurate. -- Lew --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
finding memory required f "kkrish" <kkrish@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: finding memory requir "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
csiph-web