gcj mingw32 and java memory footprint.

Jeff Sturm jsturm@one-point.com
Wed Feb 19 03:17:00 GMT 2003


On Tue, 18 Feb 2003, Norbert Frese wrote:
> for(int i=0;i<1000;i++)  {
>          AnyClass ref = new AnyClass();
>          ref = null;
> }
>
> this loop would quickly create 1000 instances of AnyClass on the heap,
> which are all garbage.

It isn't certain this will leave 1000 dead objects on the heap.  Garbage
collection can occur during this loop, in which case at least some of the
objects will be reclaimed and potentially re-allocated.

Jeff



More information about the Java mailing list