On Tue, Dec 28, 2004 at 06:03:13PM -0000, [EMAIL PROTECTED] wrote: > > Index: LengthBase.java > =================================================================== > RCS file: > /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/LengthBase.java,v > retrieving revision 1.8 > retrieving revision 1.9 > diff -u -r1.8 -r1.9 > --- LengthBase.java 28 Oct 2004 10:00:19 -0000 1.8 > +++ LengthBase.java 28 Dec 2004 18:03:12 -0000 1.9 > @@ -20,6 +20,7 @@ > > import org.apache.fop.fo.Constants; > import org.apache.fop.fo.FObj; > +import org.apache.fop.fo.IntrinsicSizeAccess; > import org.apache.fop.fo.PropertyList; > import org.apache.fop.fo.expr.PropertyException; > > @@ -122,13 +128,15 @@ > case BLOCK_HEIGHT: > return > parentFO.getLayoutDimension(PercentBase.BLOCK_BPD).intValue(); > case CONTAINING_REFAREA: // example: start-indent, end-indent > - { > //FONode fo; > //for (fo = parentFO; fo != null && > !fo.generatesReferenceAreas(); > // fo = fo.getParent()); > //return (((fo != null) && (fo instanceof FObj)) ? > ((FObj)fo).getContentWidth() : 0); > return 0; > - } > + case IMAGE_INTRINSIC_WIDTH: > + return > ((IntrinsicSizeAccess)propertyList.getFObj()).getIntrinsicWidth(); > + case IMAGE_INTRINSIC_HEIGHT: > + return > ((IntrinsicSizeAccess)propertyList.getFObj()).getIntrinsicHeight(); > case CUSTOM_BASE: > //log.debug("!!! LengthBase.getBaseLength() called on > CUSTOM_BASE type !!!"); > return 0;
I am surprised to find the property list here. If I understand Finn's restructuring of the usage of property lists, it was the intention that all references to the property lists are released, so that they can be GC'ed. The exceptions are the subtree under Marker and the line of ancestors of RetrieveMarker. This patch reveals that LengthBase maintains a reference to the property list. Perhaps that is an oversight in the restructuring? Perhaps the references to the property list and to the parent FO might be replaced by a reference to the FO to which the property using this LengthBase belongs. But I would not know how to replace the method PropertyList.getInherited(). Perhpaps Finn wants to take a look at this? Regards, Simon -- Simon Pepping home page: http://www.leverkruid.nl