Re: listing and destroying MathTypes

Hi Ken,

> I would like to use VisAD to build a general-purpose data
> definition/creation/visualization system.  The user would be able to define
> new MathTypes at runtime (not a problem), list all previously defined
> MathTypes, destroy MathTypes that are no longer useful, and save MathTypes
> between runs (shouldn't be a problem because MathType and its subtypes
> implement java.io.Serializable).  I am having trouble figuring out how to
> list all previously defined MathTypes and how to destroy MathTypes.  Can
> you give me some pointers?

VisAD itself does not maintain a list of all MathTypes, so
your system would have to maintain its own list. The ScalarType
class does keep a HashTable of all ScalarTypes constructed
on this JVM, but it is not exhaustive since ScalarTypes can
come in from other JVMs via RMI.

You should be able to destroy MathTypes, except ScalarTypes,
by deleting all references to them and letting them get
garbage collected.

Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: