[jdom-interest] Memory problem

Bradley S. Huffman hip at a.cs.okstate.edu
Mon Oct 21 09:22:34 PDT 2002

Hmmm, Field.setAccessible, wish I knew about that a few months ago when
I tried writing a class like this, thanks for the insight :)


"Dr. Olaf Diehl" writes:

> Hello,
> this is not about XML but about memory measurement.
> I've written a method debugSize which calculates the size of an object
> network via reflection. The attached java source file has a main with sample
> code and javadoc.
> The method is not fast, measuring 1MB may take a minute if there are lots of
> tiny objects. Be careful with listeners, the code will follow these
> references. You can switch the flag debugSizeTransient to decide if the code
> should follow transient fields (but e.g. HashMap entry array is transient,
> too!).
> Perhaps it can help you to locate memory problems with JDOM.
> Regards
>     Olaf

More information about the jdom-interest mailing list