Last updated by Roedy Green ©1996-1999 Canadian Mind Products.
Stuck in a frame? Click here to break out.
With explicit freeing, you can accidentally free an object while some other reference is still pointing to it. Or you can forget to free it, and eventually clog memory with unused objects. There is nothing to stop you from writing your own explicit free allocators in Java that recycle objects in preference to creating new ones. These sorts of custom allocator would work well when objects are a standard size, when you don't build complex references to these objects, when the objects are short lived, when RAM is tight, and/or when there are large numbers of live objects at any one time.
There are many ways of classifying garabage collectors, e.g. conservative vs. fully accurate. Conservative collection assumes everything on the stack is a pointer, and tries to trace its descendants. Fully accurate ones determine first which are pointers and which are ints and floats. There are three main problems with conservative collectors:
A simple mark/sweep garbage collector (such as used in JDK 1.0 through 1.2) pauses from time to time to collect all the garbage. This creates a quite noticeable pause from time to time. A generational collector does the work in little bits more frequently.
The amount of ingenuity in the design of garbage collection algorithms is astounding. Jove, for example, uses a precise, multi-threaded, generational garbage collector. Sun's HotSpot claims to have a utterly state of the art garbage collector. See the Demon links.
The program is slightly more difficult to install than most, mainly because of vague documentation and the lack of an installer. Here are some hints for installing under Windows 9x or NT:
Title | ISBN | approx cost |
---|---|---|
The Java Application Programming Interface
(Java Series) Vol 1. |
0-201-63453-8 | $41 |
The Java Application Programming Interface : Window Toolkit and Applets (Java Series) Vol 2. | 0-201-63459-7 | $41 |
The Java Language Specification (Java Series) (online) | 0-201-63451-1 | $40 |
The Java Programming Language (Java Series) | 0-201-31006-6 | $38 |
If your GridBagLayout does not work, here are some things to check:
![]() |
![]() |
![]() | |
![]() |
Canadian Mind Products | You can get an updated copy of this page from http://mindprod.com/jglossg.html | The Mining Company's
Focus on Java Best of the Net Award |