mbedward / jaitools

Raster image processing for Java developers
17 stars 15 forks source link

Improve zonalStats/classifiedStats dispose management #194

Open mbedward opened 11 years ago

mbedward commented 11 years ago

Original author: dany.Geo...@gmail.com (August 01, 2011 09:32:45)

zonalStats and classifiedStats actually implements NullOpImage which doesn't keep track of the source images (which should be disposed too).

We need to check this and improve it when dealing with disposals operations.

Original issue: http://code.google.com/p/jaitools/issues/detail?id=196

mbedward commented 11 years ago

From michael.bedward@gmail.com on September 24, 2012 02:42:27 More details on this one, or a suggested approach ?

mbedward commented 11 years ago

From dany.Geo...@gmail.com on September 25, 2012 09:27:17 Hi Michael, As far as I remember, the zonalStats deals with the dataImage and the zoneImage (the source images). We should check whether they are properly disposed when disposing the image (NullOpImage doesn't store the sources).

A thing we did for a processing operation which was using different sources and producing different inner RenderedImages was keeping track of all the involved RenderedImages (using a Stack) and dispose them at the end but this has been done since those intermediate ops wasn't part of the same Graph. I guess zonalStats management may be simpler.

mbedward commented 11 years ago

From michael.bedward@gmail.com on September 26, 2012 00:30:59 Hi Daniele, Thanks very much for that. It sounds like something that would be best to give thought and discussion to rather than rush a quick fix into version 1.3. If you agree I'll defer this one to the next version.

mbedward commented 11 years ago

From dany.Geo...@gmail.com on September 26, 2012 10:00:41 Sounds good.