Index: 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.api/src/main/java/org/gvsig/view3d/swing/api/MapControl3D.java
===================================================================
--- 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.api/src/main/java/org/gvsig/view3d/swing/api/MapControl3D.java	(revision 458)
+++ 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.api/src/main/java/org/gvsig/view3d/swing/api/MapControl3D.java	(revision 459)
@@ -25,6 +25,7 @@
 package org.gvsig.view3d.swing.api;
 
 import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.tools.dispose.Disposable;
 import org.gvsig.tools.swing.api.Component;
 import org.gvsig.view3d.swing.api.View3DSwingManager.TYPE;
 
@@ -33,7 +34,7 @@
  * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
  *
  */
-public interface MapControl3D extends Component{
+public interface MapControl3D extends Component, Disposable{
     
     /**
      * 
Index: 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultView3DPanel.java
===================================================================
--- 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultView3DPanel.java	(revision 458)
+++ 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultView3DPanel.java	(revision 459)
@@ -25,6 +25,8 @@
 package org.gvsig.view3d.swing.impl;
 
 import java.awt.BorderLayout;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
 
 import javax.swing.JComponent;
 import javax.swing.JPanel;
@@ -60,6 +62,22 @@
             swingManager.createMapControl3D(theMapContext, type);
 
         this.add(mapControl3D.asJComponent(), BorderLayout.CENTER);
+        
+        this.addComponentListener(new ComponentListener() {
+            
+            public void componentShown(ComponentEvent e) {
+            }
+            
+            public void componentResized(ComponentEvent e) {
+            }
+            
+            public void componentMoved(ComponentEvent e) {
+            }
+            
+            public void componentHidden(ComponentEvent e) {
+                getMapControl3D().dispose();
+            }
+        });
     }
 
     public JComponent asJComponent() {
Index: 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultMapControl3D.java
===================================================================
--- 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultMapControl3D.java	(revision 458)
+++ 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/DefaultMapControl3D.java	(revision 459)
@@ -62,6 +62,7 @@
 import org.gvsig.fmap.mapcontext.MapContext;
 import org.gvsig.fmap.mapcontext.layers.FLayer;
 import org.gvsig.fmap.mapcontext.layers.operations.LayersVisitor;
+import org.gvsig.tools.dispose.Disposable;
 import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.visitor.VisitCanceledException;
 import org.gvsig.view3d.swing.api.MapControl3D;
@@ -73,7 +74,7 @@
  * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
  *
  */
-public class DefaultMapControl3D extends JPanel implements MapControl3D {
+public class DefaultMapControl3D extends JPanel implements MapControl3D, Disposable{
 
     private static final long serialVersionUID = 2024899922367896097L;
 
@@ -187,6 +188,15 @@
     public JComponent asJComponent() {
         return this;
     }
+    
+    public void dispose() {
+        
+        if(this.wwd != null){
+            this.wwd = null;
+        }
+        
+        WorldWind.shutDown();
+    }
 
     public MapContext getMapContext() {
         return this.mapContext;
@@ -360,5 +370,4 @@
         // TODO
         throw new UnsupportedOperationException();
     }
-
 }
