Index: trunk/src/lib/graphics/effects/graphics_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6980)
+++ trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6981)
@@ -20,5 +20,4 @@
 #include "graphics_effect.h"
 
-#include "graphics_engine.h"
 #include "load_param.h"
 
Index: trunk/src/lib/graphics/importer/height_map.h
===================================================================
--- trunk/src/lib/graphics/importer/height_map.h	(revision 6980)
+++ trunk/src/lib/graphics/importer/height_map.h	(revision 6981)
@@ -28,5 +28,5 @@
 class HeightMap;
 
-class Tile 
+class Tile
 {
 public:
@@ -40,5 +40,5 @@
 float x;
 float z;
-~Tile();
+virtual ~Tile();
 
 
@@ -47,5 +47,5 @@
 HeightMap* hmref;
 VertexArrayModel* highResModel;
-VertexArrayModel* lowResModel; 
+VertexArrayModel* lowResModel;
 int highRes;
 int lowRes;
@@ -60,12 +60,12 @@
 void load(int Mode);
 void load(const char*, int Mode);
-void scale( Vector V); 
+void scale( Vector V);
 void setAbsCoor(Vector V);
-float getHeight(float x, float y); 
+float getHeight(float x, float y);
 float getNormal(float x, float y);
 HeightMap();
 HeightMap(const char*);
 HeightMap(const char*, const char*);
-~HeightMap();
+virtual ~HeightMap();
 
 friend class Tile;
@@ -74,5 +74,5 @@
 SDL_Surface* heightMap;
 SDL_Surface* colourMap;
-unsigned char* heights; 
+unsigned char* heights;
 unsigned char* colours;
 
@@ -80,8 +80,8 @@
 void drawRect(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight );
 void fixBoarder(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight);
-Vector  **  normalVectorField ; 
+Vector  **  normalVectorField ;
 Tile    ***  tiles;
 Vector    camCoords;
-Vector offsetCoords;  
+Vector offsetCoords;
 Material * tmp_mat;
 Material* red_mat;
Index: trunk/src/lib/graphics/importer/media_container.h
===================================================================
--- trunk/src/lib/graphics/importer/media_container.h	(revision 6980)
+++ trunk/src/lib/graphics/importer/media_container.h	(revision 6981)
@@ -45,5 +45,5 @@
 
   MediaContainer(const char* filename = NULL);
-  ~MediaContainer();
+  virtual ~MediaContainer();
 
   bool loadMedia(const char* filename);
@@ -53,5 +53,5 @@
 
 private:
-  
+
   GLuint getNextFrame();
   void unloadMedia();
Index: trunk/src/lib/graphics/importer/movie_player.h
===================================================================
--- trunk/src/lib/graphics/importer/movie_player.h	(revision 6980)
+++ trunk/src/lib/graphics/importer/movie_player.h	(revision 6981)
@@ -59,5 +59,5 @@
 
   MoviePlayer(const char* filename = NULL);
-  ~MoviePlayer();
+  virtual ~MoviePlayer();
 
   bool loadMovie(const char* filename);
Index: trunk/src/lib/graphics/importer/texture.h
===================================================================
--- trunk/src/lib/graphics/importer/texture.h	(revision 6980)
+++ trunk/src/lib/graphics/importer/texture.h	(revision 6981)
@@ -20,5 +20,5 @@
       Texture(const char* imageName = NULL, GLenum target = GL_TEXTURE_2D);
   //  Texture(TEXTURE_TYPE type, int resolution);
-      ~Texture();
+      virtual ~Texture();
 
       bool loadImage(const char* imageName, GLenum target = GL_TEXTURE_2D);
Index: trunk/src/lib/graphics/importer/texture_sequence.h
===================================================================
--- trunk/src/lib/graphics/importer/texture_sequence.h	(revision 6980)
+++ trunk/src/lib/graphics/importer/texture_sequence.h	(revision 6981)
@@ -23,5 +23,5 @@
     TextureSequence(unsigned int count = 0, ...);
   //  Texture(TEXTURE_TYPE type, int resolution);
-    ~TextureSequence();
+    virtual ~TextureSequence();
 
     bool loadImageSeries(unsigned int count, ...);
Index: trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/text.h	(revision 6980)
+++ trunk/src/lib/graphics/text_engine/text.h	(revision 6981)
@@ -40,5 +40,5 @@
   public:
     Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE);
-    ~Text();
+    virtual ~Text();
     void init();
 
Index: trunk/src/lib/gui/gtk_gui/gui.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui.h	(revision 6981)
@@ -24,5 +24,5 @@
  public:
   Gui(int argc, char *argv[]);
-  ~Gui();
+  virtual ~Gui();
 
   void startGui();
Index: trunk/src/lib/gui/gtk_gui/gui_audio.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_audio.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_audio.h	(revision 6981)
@@ -14,5 +14,5 @@
  public:
   GuiAudio();
-  ~GuiAudio();
+  virtual ~GuiAudio();
 };
 #endif /* _GUI_AUDIO_H */
Index: trunk/src/lib/gui/gtk_gui/gui_banner.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_banner.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_banner.h	(revision 6981)
@@ -16,5 +16,5 @@
  public:
   GuiBanner();
-  ~GuiBanner();
+  virtual ~GuiBanner();
 };
 
Index: trunk/src/lib/gui/gtk_gui/gui_exec.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_exec.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_exec.h	(revision 6981)
@@ -34,5 +34,5 @@
  public:
   GuiExec();
-  ~GuiExec();
+  virtual ~GuiExec();
 
   void setConfDir(const char* confDir);
Index: trunk/src/lib/gui/gtk_gui/gui_flags.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_flags.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_flags.h	(revision 6981)
@@ -22,9 +22,9 @@
  public:
   GuiFlags();
-  ~GuiFlags();
+  virtual ~GuiFlags();
 
   void setTextFromFlags(Widget* widget);
   static void flagsText(Widget* widget, void* flagInfo);
-  
+
   //! Struct that handles flag information.
   struct FlagInfo
Index: trunk/src/lib/gui/gtk_gui/gui_keys.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_keys.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_keys.h	(revision 6981)
@@ -28,5 +28,5 @@
  public:
   GuiKeys();
-  ~GuiKeys();
+  virtual ~GuiKeys();
 
   static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed.
@@ -55,5 +55,5 @@
   MiscKeys();
 
-  Button* getOpenButton();  
+  Button* getOpenButton();
 };
 
Index: trunk/src/lib/gui/gtk_gui/gui_update.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_update.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_update.h	(revision 6981)
@@ -100,5 +100,5 @@
  public:
   GuiUpdate();
-  ~GuiUpdate();
+  virtual ~GuiUpdate();
 
 #ifdef HAVE_CURL
Index: trunk/src/lib/gui/gtk_gui/gui_video.h
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_video.h	(revision 6980)
+++ trunk/src/lib/gui/gtk_gui/gui_video.h	(revision 6981)
@@ -18,8 +18,8 @@
  private:
   //  Button* advancedWindowGetButton();
-  
+
  public:
   GuiVideo();
-  ~GuiVideo();
+  virtual ~GuiVideo();
 
  private:
Index: trunk/src/lib/network/connection_monitor.h
===================================================================
--- trunk/src/lib/network/connection_monitor.h	(revision 6980)
+++ trunk/src/lib/network/connection_monitor.h	(revision 6981)
@@ -14,5 +14,5 @@
   public:
     ConnectionMonitor();
-    ~ConnectionMonitor();
+    virtual ~ConnectionMonitor();
 
     void                processPacket(byte* packet, unsigned int packetLength);
Index: trunk/src/lib/network/converter.h
===================================================================
--- trunk/src/lib/network/converter.h	(revision 6980)
+++ trunk/src/lib/network/converter.h	(revision 6981)
@@ -30,5 +30,5 @@
     static int intToByteArray(int x, byte* a, int length);
     static int byteArrayToInt(const byte* a, int* x);
-    
+
     static int _intToByteArray(int x, byte* a, int length);
     static int _byteArrayToInt(const byte* a, int* x);
@@ -60,5 +60,5 @@
   private:
     Converter();
-    ~Converter();
+    virtual ~Converter();
 };
 
Index: trunk/src/lib/network/data_stream.h
===================================================================
--- trunk/src/lib/network/data_stream.h	(revision 6980)
+++ trunk/src/lib/network/data_stream.h	(revision 6981)
@@ -20,5 +20,5 @@
       DataStream();
       DataStream(DataStream& inStream, DataStream& outStream);
-      ~DataStream();
+      virtual ~DataStream();
 
 
Index: trunk/src/lib/network/network_game_manager.h
===================================================================
--- trunk/src/lib/network/network_game_manager.h	(revision 6980)
+++ trunk/src/lib/network/network_game_manager.h	(revision 6981)
@@ -76,5 +76,5 @@
 {
   public:
-    ~NetworkGameManager();
+    virtual ~NetworkGameManager();
 
     static NetworkGameManager* NetworkGameManager::getInstance()
Index: trunk/src/lib/network/network_manager.h
===================================================================
--- trunk/src/lib/network/network_manager.h	(revision 6980)
+++ trunk/src/lib/network/network_manager.h	(revision 6981)
@@ -31,5 +31,5 @@
     inline static NetworkManager* getInstance() { if (!NetworkManager::singletonRef) NetworkManager::singletonRef = new NetworkManager();
       return NetworkManager::singletonRef; }
-    ~NetworkManager();
+    virtual ~NetworkManager();
 
     void initialize();
Index: trunk/src/lib/network/network_protocol.h
===================================================================
--- trunk/src/lib/network/network_protocol.h	(revision 6980)
+++ trunk/src/lib/network/network_protocol.h	(revision 6981)
@@ -27,5 +27,5 @@
   public:
     NetworkProtocol();
-    ~NetworkProtocol();
+    virtual ~NetworkProtocol();
 
     int createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source);
Index: trunk/src/lib/network/network_socket.h
===================================================================
--- trunk/src/lib/network/network_socket.h	(revision 6980)
+++ trunk/src/lib/network/network_socket.h	(revision 6981)
@@ -87,5 +87,5 @@
 
   NetworkSocket();
-  ~NetworkSocket();
+  virtual ~NetworkSocket();
   NetworkSocket(IPaddress ip);
   NetworkSocket(TCPsocket sock);
Index: trunk/src/lib/network/network_stream.h
===================================================================
--- trunk/src/lib/network/network_stream.h	(revision 6980)
+++ trunk/src/lib/network/network_stream.h	(revision 6981)
@@ -35,5 +35,5 @@
     NetworkStream(unsigned int port);
 
-    ~NetworkStream();
+    virtual ~NetworkStream();
     void init();
 
Index: trunk/src/lib/network/server_socket.h
===================================================================
--- trunk/src/lib/network/server_socket.h	(revision 6980)
+++ trunk/src/lib/network/server_socket.h	(revision 6981)
@@ -37,5 +37,5 @@
     ServerSocket();
     ServerSocket( unsigned int port );
-    ~ServerSocket();
+    virtual ~ServerSocket();
     bool listen( unsigned int port );
     NetworkSocket* getNewSocket( void );
Index: trunk/src/lib/parser/ini_parser/ini_parser.h
===================================================================
--- trunk/src/lib/parser/ini_parser/ini_parser.h	(revision 6980)
+++ trunk/src/lib/parser/ini_parser/ini_parser.h	(revision 6981)
@@ -43,5 +43,5 @@
   public:
     IniParser (const char* filename = NULL);
-    ~IniParser ();
+    virtual ~IniParser ();
 
     /** @returns true if the file is opened, false otherwise*/
Index: trunk/src/lib/shell/shell_command_class.h
===================================================================
--- trunk/src/lib/shell/shell_command_class.h	(revision 6980)
+++ trunk/src/lib/shell/shell_command_class.h	(revision 6981)
@@ -37,5 +37,5 @@
   private:
     ShellCommandClass(const char* className);
-    ~ShellCommandClass();
+    virtual ~ShellCommandClass();
 
     static const ShellCommandClass* isRegistered(const char* className);
Index: trunk/src/lib/sound/ogg_player.h
===================================================================
--- trunk/src/lib/sound/ogg_player.h	(revision 6980)
+++ trunk/src/lib/sound/ogg_player.h	(revision 6981)
@@ -28,5 +28,5 @@
 public:
   OggPlayer(const char* fileName = NULL);
-  ~OggPlayer();
+  virtual ~OggPlayer();
 
   bool open(const char* fileName);
Index: trunk/src/lib/sound/sound_buffer.h
===================================================================
--- trunk/src/lib/sound/sound_buffer.h	(revision 6980)
+++ trunk/src/lib/sound/sound_buffer.h	(revision 6981)
@@ -18,5 +18,5 @@
   public:
     SoundBuffer(const char* fileName);
-    ~SoundBuffer();
+    virtual ~SoundBuffer();
 
     bool loadWAV(const char* fileName);
Index: trunk/src/lib/sound/sound_source.h
===================================================================
--- trunk/src/lib/sound/sound_source.h	(revision 6980)
+++ trunk/src/lib/sound/sound_source.h	(revision 6981)
@@ -19,5 +19,5 @@
   public:
     SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL);
-    ~SoundSource();
+    virtual ~SoundSource();
 
   // user interaction
Index: trunk/src/story_entities/game_world.cc
===================================================================
--- trunk/src/story_entities/game_world.cc	(revision 6980)
+++ trunk/src/story_entities/game_world.cc	(revision 6981)
@@ -190,8 +190,9 @@
   PRINTF(3)("GameWorld::~GameWorld() - unloading the current GameWorld\n");
 
+  this->dataTank->unloadData();
+
   if (this->dataXML)
     delete this->dataXML;
 
-  this->dataTank->unloadData();
 }
 
Index: trunk/src/story_entities/game_world_data.cc
===================================================================
--- trunk/src/story_entities/game_world_data.cc	(revision 6980)
+++ trunk/src/story_entities/game_world_data.cc	(revision 6981)
@@ -247,14 +247,26 @@
   // erease everything that is left.
   // delete PNode::getNullParent(); // not needed as this is also done in the next step (and also much cleaner)
-
+  const std::list<BaseObject*>* nodeList;
   //secondary cleanup of PNodes;
-  const std::list<BaseObject*>* nodeList = ClassList::getList(CL_PARENT_NODE);
+  nodeList = ClassList::getList(CL_PARENT_NODE);
   if (nodeList != NULL)
     while (!nodeList->empty())
       delete nodeList->front();
-
   /* remove the player object */
   if( this->localPlayer)
     delete this->localPlayer;
+
+//   nodeList = ClassList::getList(CL_GRAPHICS_EFFECT);
+//   if (nodeList != NULL)
+//     while (!nodeList->empty())
+//       delete nodeList->front();
+//
+//   nodeList = ClassList::getList(CL_ELEMENT_2D);
+//   if (nodeList != NULL)
+//     while (!nodeList->empty())
+//       delete nodeList->front();
+
+
+
 
   // unload the resources !!
Index: trunk/src/story_entities/simple_game_menu.h
===================================================================
--- trunk/src/story_entities/simple_game_menu.h	(revision 6980)
+++ trunk/src/story_entities/simple_game_menu.h	(revision 6981)
@@ -25,5 +25,5 @@
   public:
     MenuLayer() {}
-    ~MenuLayer() {}
+    virtual ~MenuLayer() {}
 
 
Index: trunk/src/subprojects/framework.h
===================================================================
--- trunk/src/subprojects/framework.h	(revision 6980)
+++ trunk/src/subprojects/framework.h	(revision 6981)
@@ -17,5 +17,5 @@
 class Framework {
   public:
-    ~Framework();
+    virtual ~Framework();
 
     /** \returns a Pointer to the only object of this Class */
Index: trunk/src/subprojects/network/network_unit_test.h
===================================================================
--- trunk/src/subprojects/network/network_unit_test.h	(revision 6980)
+++ trunk/src/subprojects/network/network_unit_test.h	(revision 6981)
@@ -15,5 +15,5 @@
   public:
     NetworkUnitTest();
-    ~NetworkUnitTest();
+    virtual ~NetworkUnitTest();
 
     void start();
Index: trunk/src/subprojects/network/read_sync.h
===================================================================
--- trunk/src/subprojects/network/read_sync.h	(revision 6980)
+++ trunk/src/subprojects/network/read_sync.h	(revision 6981)
@@ -14,5 +14,5 @@
   public:
     ReadSync(const char* name);
-    ~ReadSync();
+    virtual ~ReadSync();
 
     virtual int writeBytes(const byte* data, int length, int sender);
Index: trunk/src/subprojects/network/simple_sync.h
===================================================================
--- trunk/src/subprojects/network/simple_sync.h	(revision 6980)
+++ trunk/src/subprojects/network/simple_sync.h	(revision 6981)
@@ -14,5 +14,5 @@
   public:
     SimpleSync(const char* name);
-    ~SimpleSync();
+    virtual ~SimpleSync();
 
     virtual int writeBytes(const byte* data, int length, int sender);
Index: trunk/src/subprojects/network/write_sync.h
===================================================================
--- trunk/src/subprojects/network/write_sync.h	(revision 6980)
+++ trunk/src/subprojects/network/write_sync.h	(revision 6981)
@@ -14,5 +14,5 @@
   public:
     WriteSync(const char* name);
-    ~WriteSync();
+    virtual ~WriteSync();
 
     virtual int writeBytes(const byte* data, int length, int sender);
Index: trunk/src/util/loading/game_loader.h
===================================================================
--- trunk/src/util/loading/game_loader.h	(revision 6980)
+++ trunk/src/util/loading/game_loader.h	(revision 6981)
@@ -40,5 +40,5 @@
 {
  public:
-  ~GameLoader ();
+  virtual ~GameLoader ();
   /**  this class is a singleton class @returns an instance of itself  */
   static GameLoader* getInstance() { if(singletonRef == NULL) singletonRef = new GameLoader(); return singletonRef; }
Index: trunk/src/util/loading/load_param.h
===================================================================
--- trunk/src/util/loading/load_param.h	(revision 6980)
+++ trunk/src/util/loading/load_param.h	(revision 6981)
@@ -89,5 +89,5 @@
   public:
     CLoadParam(const TiXmlElement* root, const char* paramName, BaseObject* object, const Executor& executor, bool inLoadCycle = false);
-    ~CLoadParam();
+    virtual ~CLoadParam();
 
     CLoadParam& describe(const char* descriptionText);
Index: trunk/src/util/track/track_manager.h
===================================================================
--- trunk/src/util/track/track_manager.h	(revision 6980)
+++ trunk/src/util/track/track_manager.h	(revision 6981)
@@ -44,5 +44,5 @@
  public:
   TrackElement();
-  ~TrackElement();
+  virtual ~TrackElement();
 
   TrackElement* findByID(unsigned int trackID);
Index: trunk/src/world_entities/environments/water.h
===================================================================
--- trunk/src/world_entities/environments/water.h	(revision 6980)
+++ trunk/src/world_entities/environments/water.h	(revision 6981)
@@ -23,5 +23,5 @@
  public:
    Water(const TiXmlElement* root = NULL);
-   ~Water();
+   virtual ~Water();
 
    void loadParams(const TiXmlElement* root);
Index: trunk/src/world_entities/movie_entity.h
===================================================================
--- trunk/src/world_entities/movie_entity.h	(revision 6980)
+++ trunk/src/world_entities/movie_entity.h	(revision 6981)
@@ -30,5 +30,5 @@
   public:
     MovieEntity (const TiXmlElement* root = NULL);
-    ~MovieEntity ();
+    virtual ~MovieEntity ();
 
     virtual void draw () const;
Index: trunk/src/world_entities/npcs/npc.h
===================================================================
--- trunk/src/world_entities/npcs/npc.h	(revision 6980)
+++ trunk/src/world_entities/npcs/npc.h	(revision 6981)
@@ -12,5 +12,5 @@
  public:
   NPC ();
-  ~NPC ();
+  virtual ~NPC ();
 
 
Index: trunk/src/world_entities/npcs/npc_test.h
===================================================================
--- trunk/src/world_entities/npcs/npc_test.h	(revision 6980)
+++ trunk/src/world_entities/npcs/npc_test.h	(revision 6981)
@@ -12,5 +12,5 @@
  public:
   NPC2 ();
-  ~NPC2 ();
+  virtual ~NPC2 ();
 
 
Index: trunk/src/world_entities/npcs/npc_test1.h
===================================================================
--- trunk/src/world_entities/npcs/npc_test1.h	(revision 6980)
+++ trunk/src/world_entities/npcs/npc_test1.h	(revision 6981)
@@ -11,5 +11,5 @@
  public:
   NPCTest1 ();
-  ~NPCTest1 ();
+  virtual ~NPCTest1 ();
 
 
Index: trunk/src/world_entities/recorder.h
===================================================================
--- trunk/src/world_entities/recorder.h	(revision 6980)
+++ trunk/src/world_entities/recorder.h	(revision 6981)
@@ -1,5 +1,5 @@
 /*!
  * @file recorder.h
- * 
+ *
  */
 
@@ -33,5 +33,5 @@
     AVPacket packet;
     double video_pts;
-    
+
     uint8_t *picture_buf;
     int size;
@@ -48,5 +48,5 @@
   public:
     Recorder (const TiXmlElement* root = NULL);
-    ~Recorder ();
+    virtual ~Recorder ();
 
     virtual void draw () const;
Index: trunk/src/world_entities/weapons/weapon_manager.h
===================================================================
--- trunk/src/world_entities/weapons/weapon_manager.h	(revision 6980)
+++ trunk/src/world_entities/weapons/weapon_manager.h	(revision 6981)
@@ -53,5 +53,5 @@
     WeaponManager(WorldEntity* parent);
     WeaponManager(const TiXmlElement* root);
-    ~WeaponManager();
+    virtual ~WeaponManager();
 
     void init();
