On Dec 20, 2006, at 20:45, Jeremias Maerki wrote:

I wonder about the effect of that on very long running server
applications producing all kinds of different documents. There's no
chance for freeing instances here if memory is needed. I assume that in
this case the set of instances will still remain relatively small. But
still, this is memory that is never freed and some instances may never
be reused after a particular rendering run.

True indeed. My bad. Richard was a bit smarter, and used a WeakHashMap, so that the instances that are no longer referenced can be released. OTOH, since the access to the propertyCaches is not synchronized in Richard's patch, I'm wondering whether or not the possibility arises that two parallel threads issue a put() on the Map at the same time for an equal instance...?

Maybe we're both slightly off...

Anyway, I'll see if I can adapt to use WeakHashMap too. Should work.

Thanks for the vigilance!

Cheers,

Andreas

Reply via email to