NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
new MapProejctionDisplay add a DisplayableData getImage destroyUsing the jhat heap dump analysis tool in Java6, I think I have found the culprit. visad's DisplayRealType has a static vector into which all instances are added. There is no method to remove instances from this list. So even making sure that names of DisplayRealTypes do not clash, my program leaks.
I am happy to fix this locally in the source code, but am unsure of the implications, even within this one class. Why must names be unique? Can I just add a 'remove by name' method and call this from somewhere, probably MapProjectionDisplay??
I note that in ScalarType, use is made of WeakMapValues, in order to avoid another memory issue relating to static maps. This idiom seems to have not crossed over to DisplayRealType?? It seems like DRT is almost duplicating uniqueness logic already in ScalarType????
Any advice appreciated Stuart
visad
archives: