In the previous version of the GTV, the metacode describing the plots was stored in several chunks of memory. The current chunk was contiguously filled with all the incoming data: directory descriptors, segments descriptors, segment data, or image descriptors. When the current chunk was (nearly) full, it was copied to a newly allocated chunk, and reset for new use. This had 3 major limitations:
Given these limitations, the choice was made to fully rewrite the way
the metacode data is stored in memory. Appropriate Fortran derived
types were defined: they describe the various links an object can have
with others in the tree. Figure shows an example of the
various kind of data which can be encountered in the metacode.
All the links are made with allocatable pointers, which are allocated in real time, on-demand. The tree is thus now growing dynamically in memory. Deleting an object is just as easy as deallocating a pointer to it, after having taken care that the surrounding elements in the tree are correctly updated. Furthermore, deallocation can be delayed (i.e. put in the event stack) after all the events which need it are done, without altering the normal life of the tree (as ruled by the commands executed).