Index: code/trunk/src/orxonox/hud/HUD.cc
===================================================================
--- code/trunk/src/orxonox/hud/HUD.cc	(revision 1566)
+++ code/trunk/src/orxonox/hud/HUD.cc	(revision 1567)
@@ -46,5 +46,4 @@
 #include "RadarOverlayElement.h"
 #include "Navigation.h"
-#include "OverlayElementFactories.h"
 
 namespace orxonox
@@ -59,12 +58,29 @@
     HUD::HUD()
     {
+        orxonoxHUD_ = 0;
+        container_ = 0;
+        fpsText_ = 0;
+        rTRText_ = 0;
+        energyBar_ = 0;
+        speedoBar_ = 0;
+        radar_ = 0;
+        nav_ = 0;
+        bool showFPS_ = true;
+        bool showRenderTime_ = true;
+    }
+
+    HUD::~HUD()
+    {
+        this->destroy();
+    }
+
+    void HUD::initialise()
+    {
         showFPS_ = true;
         showRenderTime_ = true;
 
         // create Factories
-        barOverlayElementFactory_ = new BarOverlayElementFactory();
-        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(barOverlayElementFactory_);
-        radarOverlayElementFactory_ = new RadarOverlayElementFactory();
-        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(radarOverlayElementFactory_);
+        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&barOverlayElementFactory_);
+        Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&radarOverlayElementFactory_);
 
         orxonoxHUD_ = Ogre::OverlayManager::getSingleton().create("Orxonox/HUD");
@@ -139,16 +155,31 @@
     }
 
-    HUD::~HUD()
-    {
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_);
-        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_);
-
-        delete this->nav_;
-        delete this->barOverlayElementFactory_;
-        delete this->radarOverlayElementFactory_;
+    void HUD::destroy()
+    {
+        if (this->container_)
+          Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_);
+        this->container_ = 0;
+        if (this->fpsText_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_);
+        this->fpsText_ = 0;
+        if (this->rTRText_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_);
+        this->rTRText_ = 0;
+        if (this->energyBar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_);
+        this->energyBar_ = 0;
+        if (this->speedoBar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_);
+        this->speedoBar_ = 0;
+        if (this->radar_)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_);
+        this->radar_ = 0;
+        if (this->orxonoxHUD_)
+            Ogre::OverlayManager::getSingleton().destroy(this->orxonoxHUD_);
+        this->orxonoxHUD_ = 0;
+
+        if (this->nav_)
+            delete this->nav_;
+        this->nav_ = 0;
     }
 
Index: code/trunk/src/orxonox/hud/HUD.h
===================================================================
--- code/trunk/src/orxonox/hud/HUD.h	(revision 1566)
+++ code/trunk/src/orxonox/hud/HUD.h	(revision 1567)
@@ -37,4 +37,5 @@
 #include "objects/Tickable.h"
 #include "util/Math.h"
+#include "OverlayElementFactories.h"
 
 namespace orxonox
@@ -43,5 +44,7 @@
     {
       public:
-        static HUD& getSingleton();
+        void initialise();
+        void destroy();
+
         virtual void tick(float);
 
@@ -54,4 +57,6 @@
         inline std::list<RadarObject*>& getRadarObjects()
             { return this->roSet_; }
+
+        static HUD& getSingleton();
 
         static void setEnergy(float value);
@@ -66,11 +71,10 @@
         ~HUD();
 
-        static HUD* instance_s;
+        std::list<RadarObject*> roSet_;
+        BarOverlayElementFactory barOverlayElementFactory_;
+        RadarOverlayElementFactory radarOverlayElementFactory_;
 
-        std::list<RadarObject*> roSet_;
         Ogre::Overlay* orxonoxHUD_;
         Ogre::OverlayContainer* container_;
-        BarOverlayElementFactory* barOverlayElementFactory_;
-        RadarOverlayElementFactory* radarOverlayElementFactory_;
         Ogre::TextAreaOverlayElement* fpsText_;
         Ogre::TextAreaOverlayElement* rTRText_;
