Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#88 Memory leak with keys

v7.1
closed
Michael Kay
5
2014-02-21
2002-07-19
Michael Kay
No

In Saxon 7.1, when multiple transformations are run
using the same compiled stylesheet and different source
documents, an OutOfMemory error may eventually
occur. The problem happens when the stylesheet uses
keys.

I changed the strategy in 7.1 so that the indexes used
to support keys are owned by the stylesheet rather than
the source document; this has two benefits. Firstly, the
indexing code is independant of the tree model
implementation, and secondly, if multiple
transformations are done using the same stylesheet and
the same source document, the indexes are not rebuilt
each time.

The implementation relies on using a WeakHashMap to
allow documents to be garbage collected. This code
wasn't working properly.

The problem does not apply to Saxon 6.5.x or earlier
releases.

Source code fixed for 7.2 release.

Reported by Nikita Zinoviev [nikita@tepkom.ru], test
case is filed in MyJava\users\zinoviev

Michael Kay

Discussion

  • Michael Kay
    Michael Kay
    2002-08-28

    Logged In: YES
    user_id=251681

    Fixed in 7.2