[EMAIL PROTECTED] a écrit :
> shouldn't the objects returned by the coordinate operation factories shared?

Yes they should. Which Geotools version are you using?

Factories were shared from the begining at least for factories with null or 
empties Hints. Things are a little bit more complicated for non-empty Hints, 
but 
caching has been added for them too in late Geotools 2.3. If it still create a 
new factory at every call in latest Geotools 2.3, then we may have a bug...


> They are expensive to build, and as far as I know, read only. What's the 
> risk in having just one instance of each instead of one per call?

None. At least referencing factories are supposed to be thread safe and really 
designed for being shared. As you point out, they are expensive to obtain (even 
with caching in Geotools 2.3), and my idea was really that users like 
LiteRenderer would obtain one instance for ever at creation time. This is 
especially important since the factory itself maintains a caching of already 
created CRS. If we throw away the factory after every method call, we defeat 
this caching.


> PS: the streaming renderer does not hold a reference to the factory, so 
> I guess it's the disposer itself, registered in a timer queue, that keeps the 
> various factories in memory...


Yes. DeferredAuthoritityFactory.Disposer is yet an other inner non-static class.

        Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to