Index: /orxonox/trunk/src/lib/event/event_handler.cc
===================================================================
--- /orxonox/trunk/src/lib/event/event_handler.cc	(revision 4816)
+++ /orxonox/trunk/src/lib/event/event_handler.cc	(revision 4817)
@@ -65,4 +65,15 @@
   EventHandler::singletonRef = NULL;
   delete this->keyMapper;
+
+  for(int i = 0; i < ES_NUMBER; ++i)
+  {
+    for(int j = 0; j < SDLK_LAST; ++j)
+    {
+      if( this->listeners[i][j] != NULL)
+      {
+        PRINTF(2)("Someone forgot to unsubscribe an EventListener!\n");
+      }
+    }
+  }
 }
 
Index: /orxonox/trunk/src/lib/event/event_listener.cc
===================================================================
--- /orxonox/trunk/src/lib/event/event_listener.cc	(revision 4816)
+++ /orxonox/trunk/src/lib/event/event_listener.cc	(revision 4817)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -17,4 +17,5 @@
 
 #include "event_listener.h"
+#include "event_handler.h"
 
 using namespace std;
@@ -24,7 +25,7 @@
    \brief standard constructor
 */
-EventListener::EventListener () 
+EventListener::EventListener ()
 {
-   this->setClassID(CL_EVENT_LISTENER, "EventListener"); 
+   this->setClassID(CL_EVENT_LISTENER, "EventListener");
 }
 
@@ -34,4 +35,7 @@
 
 */
-EventListener::~EventListener () 
-{}
+EventListener::~EventListener ()
+{
+  /* unsubscribes itself from the event listener */
+  EventHandler::getInstance()->unsubscribe(this);
+}
Index: /orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4816)
+++ /orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4817)
@@ -18,4 +18,5 @@
 #include "graphics_engine.h"
 #include "resource_manager.h"
+#include "event_handler.h"
 
 #include "debug.h"
@@ -46,4 +47,8 @@
 
 //  this->listModes();
+
+  // subscribe the resolutionChanged-event
+  EventHandler::getInstance()->subscribe(this, ES_GAME, EV_VIDEO_RESIZE);
+
 }
 
@@ -59,4 +64,5 @@
 {
   // delete what has to be deleted here
+  EventHandler::getInstance()->unsubscribe(this);
 }
 
@@ -389,2 +395,17 @@
 
 
+/**
+  \brief processes the events for orxonox main class
+  \param the event to handle
+ */
+void GraphicsEngine::process(const Event &event)
+{
+  switch (event.type)
+  {
+    case EV_VIDEO_RESIZE:
+      this->resolutionChanged(event.resize);
+      break;
+  }
+
+}
+
Index: /orxonox/trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/graphics_engine.h	(revision 4816)
+++ /orxonox/trunk/src/lib/graphics/graphics_engine.h	(revision 4817)
@@ -5,10 +5,10 @@
 
     handles graphical SDL-initialisation, textures, resolutions, and so on
-*/
+ */
 
 #ifndef _GRAPHICS_ENGINE_H
 #define _GRAPHICS_ENGINE_H
 
-#include "base_object.h"
+#include "event_listener.h"
 
 #include "sdlincl.h"
@@ -23,5 +23,5 @@
    handles graphical SDL-initialisation, textures, resolutions, and so on
  */
-class GraphicsEngine : public BaseObject
+class GraphicsEngine : public EventListener
 {
   public:
@@ -64,4 +64,5 @@
     static void swapBuffers() { SDL_GL_SwapBuffers(); };
 
+    void process(const Event  &event);
 
   private:
Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 4816)
+++ /orxonox/trunk/src/orxonox.cc	(revision 4817)
@@ -90,5 +90,4 @@
   delete ObjectManager::getInstance();
   delete TextEngine::getInstance();
-  delete EventHandler::getInstance();
   delete Factory::getFirst();
   delete GameLoader::getInstance();
@@ -97,4 +96,6 @@
   delete CDEngine::getInstance();
   delete GarbageCollector::getInstance();
+
+  delete EventHandler::getInstance();
 
   ClassList::debug(0);
@@ -148,6 +149,4 @@
   if( initNetworking () == -1) return -1;
 
-  // subscribe the resolutionChanged-event
-  EventHandler::getInstance()->subscribe(this, ES_GAME, EV_VIDEO_RESIZE);
   return 0;
 }
@@ -291,31 +290,18 @@
    \param event: an event not handled by the CommandNode
 */
-void Orxonox::graphicsHandler(SDL_Event* event)
-{
-  // Handle special events such as reshape, quit, focus changes
-  switch (event->type)
-    {
-    case SDL_VIDEORESIZE:
-      GraphicsEngine* tmpGEngine = GraphicsEngine::getInstance();
-      tmpGEngine->resolutionChanged(event->resize);
-      break;
-    }
-}
-
-
-/**
-  \brief processes the events for orxonox main class
-  \param the event to handle
-*/
-void Orxonox::process(const Event &event)
-{
-  switch (event.type)
-  {
-    case EV_VIDEO_RESIZE:
-      GraphicsEngine::getInstance()->resolutionChanged(event.resize);
-      break;
-  }
-
-}
+// void Orxonox::graphicsHandler(SDL_Event* event)
+// {
+//   // Handle special events such as reshape, quit, focus changes
+//   switch (event->type)
+//     {
+//     case SDL_VIDEORESIZE:
+//       GraphicsEngine* tmpGEngine = GraphicsEngine::getInstance();
+//       tmpGEngine->resolutionChanged(event->resize);
+//       break;
+//     }
+// }
+
+
+
 
 
Index: /orxonox/trunk/src/orxonox.h
===================================================================
--- /orxonox/trunk/src/orxonox.h	(revision 4816)
+++ /orxonox/trunk/src/orxonox.h	(revision 4817)
@@ -7,5 +7,5 @@
 #define _ORXONOX_H
 
-#include "event_listener.h"
+#include "base_object.h"
 
 class WorldEntity;
@@ -20,5 +20,5 @@
 /**
 */
-class Orxonox : public EventListener {
+class Orxonox : public BaseObject {
 
  public:
@@ -31,6 +31,5 @@
   void start();
 
-  void graphicsHandler (SDL_Event* event);
-  void process(const Event  &event);
+  //void graphicsHandler (SDL_Event* event);
 
  private:
Index: /orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4816)
+++ /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4817)
@@ -54,4 +54,5 @@
     delete this->currentCampaign;
   this->currentCampaign = NULL;
+  this->eventHandler->unsubscribe(this, ES_ALL);
 }
 
