Re: AW: Memory problems with VisAD

  • To: Mathias Stümpert <atzes@xxxxxx>
  • Subject: Re: AW: Memory problems with VisAD
  • From: Curtis Rueden <curtis@xxxxxxxxxxxxx>
  • Date: Thu, 20 Dec 2001 08:38:08 -0600
>> One approach is to re-use DisplayImplJ3Ds rather than destroying
>> them and constructing new ones. Calls to its removeAllReferences()
>> and clearMaps() methods should set a DisplayImplJ3D up for re-use
>> (Dave or Curtis please correct me if anything else is needed).
>Won't work for me because I often have to change the DisplayRenderer of
>my DisplayImpl (DisplayRendererJ3D, TwoDDisplayRendererJ3D). Hence there
>is no setDisplayRenderer the only way to do this seems to be
>constructing a new display.

The way the VisAD SpreadSheet handles switching DisplayRenderers is
pretty simple: it constructs a separate display for each of the three
different DisplayRenderers available (DisplayRendererJ3D,
DisplayRendererJ2D, and TwoDDisplayRendererJ3D).

Then, whenever the user switches the dimension, it saves the maps and
references, clears them from the current Display, removes the Display
from the GUI, adds the new Display to the GUI, and adds the maps and
references back onto the new Display.

So, if you only have a small set of possible DisplayRenderers, you
could probably do something similar without too much overhead.


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