On Wed, Oct 31, 2012 at 9:09 AM, Ron Lindhoudt <[email protected]> wrote: > Hello, > > I have the same problem using an Oracle Datastore. > The problem seems to be in FeatureCollection and looks like a memory leak. > I use Geotools 8.0
The broken class is CollectionDataStore, which has a couple of embarassing errors with feature iterators being opened and never closed in the getBoundsInternal and getCount methods. More tragically though the class wraps a collection which comes from a JDBC data store, which is all capable of doing the count and bounds operations in a safe and far more efficient way. How did you create the map in question? I'm afraid you are using a new FeatureLayer(collection, ...) instead of using the way more efficient new FeatureLayer(featureSource, ...) Two action items: - please open one bug report for CollectionDataStore - if the documentation made you think in any way that given a FeatureSource and a collection derived from it, feeding a FeatureLayer with the collection is better, please open also a bug report against the documentation - change your code to feed the layers the feature source directly and the problem should disappear by itself Generally speaking, feed a layer a feature collection if and only if you created the feature collection in memory from scratch (e.g., instantiating a DefaultFeatureCollection or ListFeatureCollection and populating it by hand). Cheers Andrea -- == Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
