xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51150] Add DecimalFormatCache.clean() method to prevent memory leak with Tomcat
Date Wed, 18 May 2011 18:28:19 GMT

--- Comment #3 from Andreas L. Delmelle <adelmelle@apache.org> 2011-05-18 18:28:19 UTC
(In reply to comment #2)
> I've done some more research and from what I can see DecimalFormatCache is the
> only place in the FOP source where ThreadLocal is used. So there doesn't seem
> to be any more memory leaks in the FOP code related to ThreadLocal.
> Would a patch that which simply removes the DecimalFormatCache be accepted
> until a better solution comes around?

No, unless it also solves the issue that prompted the use of ThreadLocal to
begin with. The reason why this is so, is because DecimalFormat is not
thread-safe. This could potentially lead to weird behavior in case of multiple
concurrent runs in the same JVM.

As for an alternative solution that would make sense: do something similar to
what was done for color profiles, i.e. make sure all usage of DecimalFormat is
properly synchronized.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message