Index: osgVisual/src/cluster/dataIO_clusterENet.cpp
===================================================================
--- osgVisual/src/cluster/dataIO_clusterENet.cpp	(revision 86)
+++ osgVisual/src/cluster/dataIO_clusterENet.cpp	(revision 87)
@@ -22,4 +22,6 @@
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "clusterENet constructed" << std::endl;
+	#include <leakDetection.h>
+
 	serverToConnect = "unknown";
 	hardSync = false;	// integrate into init()
Index: osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp
===================================================================
--- osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp	(revision 86)
+++ osgVisual/src/cluster/dataIO_clusterENet_implementation.cpp	(revision 87)
@@ -25,4 +25,5 @@
 {
 	std::cout << "Instantiated server class# "<< activeENetInstances << std::endl;
+	#include <leakDetection.h>
 	enetInitialized = false;
 	host = NULL;
Index: osgVisual/src/core/osgVisual.cpp
===================================================================
--- osgVisual/src/core/osgVisual.cpp	(revision 86)
+++ osgVisual/src/core/osgVisual.cpp	(revision 87)
@@ -15,8 +15,16 @@
 */
 
-// Declare this in header.
+const unsigned int MAX_NUM_EVENTS = 10;
+
+#ifdef _DEBUG
+	#ifdef WIN32
+		// Declare this in header.
+		#define _CRTDBG_MAP_ALLOC
+		#include <stdlib.h>
+		#include <crtdbg.h>
+	#endif 
+#endif 
+
 //#include <windows.h>
-#define _CRTDBG_MAP_ALLOC
-#include <crtdbg.h>
 
 #include <osg/ArgumentParser>
@@ -26,5 +34,5 @@
 #include <visual_core.h>
 
-const unsigned int MAX_NUM_EVENTS = 10;
+
 
 
@@ -33,28 +41,30 @@
 	
 #ifdef _DEBUG
-	#include <leakDetection.h>	// ugly but must be included inside the class
+	#ifdef WIN32
+		#include <leakDetection.h>	// ugly but must be included inside the class
 
-    int tmp_flag;
+		int tmp_flag;
 
-    HANDLE log_file = CreateFile("mem_log.txt", GENERIC_WRITE,FILE_SHARE_WRITE,
-        NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+		HANDLE log_file = CreateFile("mem_log.txt", GENERIC_WRITE,FILE_SHARE_WRITE,
+			NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
 
-    _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
-        _CRTDBG_MODE_DEBUG);
-    _CrtSetReportMode(_CRT_WARN,_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
-    _CrtSetReportMode(_CRT_ERROR,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
-        _CRTDBG_MODE_DEBUG);
+		_CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
+			_CRTDBG_MODE_DEBUG);
+		_CrtSetReportMode(_CRT_WARN,_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+		_CrtSetReportMode(_CRT_ERROR,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
+			_CRTDBG_MODE_DEBUG);
 
-    // output to the file if not under VS
-    _CrtSetReportFile(_CRT_ASSERT, log_file);
-    _CrtSetReportFile(_CRT_WARN, log_file);
-    _CrtSetReportFile(_CRT_ERROR, log_file);
+		// output to the file if not under VS
+		_CrtSetReportFile(_CRT_ASSERT, log_file);
+		_CrtSetReportFile(_CRT_WARN, log_file);
+		_CrtSetReportFile(_CRT_ERROR, log_file);
 
-    tmp_flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
-    tmp_flag |= _CRTDBG_ALLOC_MEM_DF;
-    tmp_flag |= _CRTDBG_DELAY_FREE_MEM_DF;
-    tmp_flag |= _CRTDBG_LEAK_CHECK_DF;
+		tmp_flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+		tmp_flag |= _CRTDBG_ALLOC_MEM_DF;
+		tmp_flag |= _CRTDBG_DELAY_FREE_MEM_DF;
+		tmp_flag |= _CRTDBG_LEAK_CHECK_DF;
 
-    _CrtSetDbgFlag(tmp_flag);
+		_CrtSetDbgFlag(tmp_flag);
+	#endif 
 #endif 
 
@@ -68,4 +78,7 @@
     core->initialize();
 
+	// Shut osgVisual down
+	core->shutdown();
+
 	// Set Pointer to null to destroy the objects before this function ends - otherwise memory leaks wil be detected.
 	core = NULL;
Index: osgVisual/src/core/visual_core.cpp
===================================================================
--- osgVisual/src/core/visual_core.cpp	(revision 86)
+++ osgVisual/src/core/visual_core.cpp	(revision 87)
@@ -28,9 +28,5 @@
 visual_core::~visual_core(void)
 {
-	// shut osgVisual down
-	shutdown();
-
 	OSG_NOTIFY( osg::ALWAYS ) << "visual_core destroyed." << std::endl;
-
 }
 
@@ -49,9 +45,9 @@
 
 	// Setup coordinate system node
-	rootNode = new osg::CoordinateSystemNode;
+	rootNode = new osg::CoordinateSystemNode;	// todo memleakf
 	rootNode->setEllipsoidModel(new osg::EllipsoidModel());
 
 	// Test memory leak (todo)
-	double* test = new double[1000];
+	//double* test = new double[1000];
 
 	#ifdef USE_SPACENAVIGATOR
@@ -130,4 +126,7 @@
 	OSG_NOTIFY( osg::ALWAYS ) << "Shutdown visual_core..." << std::endl;
 
+	// Shutdown Dbug HUD
+	if(hud.valid())
+		hud->shutdown();
 	// Unset scene data
 	viewer->setSceneData( NULL );
@@ -144,4 +143,7 @@
 		distortion->shutdown();
 #endif
+
+	// Shutdown data
+	rootNode = NULL;
 
 	// Shutdown dataIO
@@ -295,27 +297,27 @@
 	//testObj->addUpdater( new object_updater(testObj) );
 
-	osg::ref_ptr<visual_object> testObj2 = new visual_object( rootNode, "cessna" );
+	osg::ref_ptr<visual_object> testObj2 = new visual_object( rootNode, "cessna" );	// todo memleak
 	//testObj2->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 600 );
 	testObj2->setNewPosition( osg::DegreesToRadians(50.8123), osg::DegreesToRadians(8.94088), 600 );
 	testObj2->loadGeometry( "../models/cessna.osg" );
-	testObj2->addUpdater( new object_updater(testObj2) );
-
-	osg::ref_ptr<visual_object> testObj3 = new visual_object( rootNode, "SAENGER1" );
+	testObj2->addUpdater( new object_updater(testObj2) );	// todo memleak
+
+	osg::ref_ptr<visual_object> testObj3 = new visual_object( rootNode, "SAENGER1" );	// todo memleak
 	testObj3->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 600 );
 	testObj3->loadGeometry( "../models/saenger1.flt" );
-	testObj3->addUpdater( new object_updater(testObj3) );
-	
-
-	osg::ref_ptr<visual_object> testObj4 = new visual_object( rootNode, "SAENGER2" );
+	testObj3->addUpdater( new object_updater(testObj3) );	// todo memleak
+	
+
+	osg::ref_ptr<visual_object> testObj4 = new visual_object( rootNode, "SAENGER2" );	// todo memleak
 	testObj4->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 650 );
 	testObj4->loadGeometry( "../models/saenger2.flt" );
-	testObj4->addUpdater( new object_updater(testObj4) );
+	testObj4->addUpdater( new object_updater(testObj4) );	// todo memleak
 	testObj4->addLabel("testLabel", "LabelTest!!\nnächste Zeile :)",osg::Vec4(1.0f,0.25f,1.0f,1.0f));
 
-	osg::ref_ptr<visual_object> testObj5 = new visual_object( rootNode, "SAENGER" );
+	osg::ref_ptr<visual_object> testObj5 = new visual_object( rootNode, "SAENGER" );	// todo memleak
 	testObj5->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 550 );
 	testObj5->loadGeometry( "../models/saengerCombine.flt" );
 	//testObj5->setScale( 2 );
-	testObj5->addUpdater( new object_updater(testObj5) );
+	testObj5->addUpdater( new object_updater(testObj5) );	// todo memleak
 
 #ifdef USE_SPACENAVIGATOR
@@ -359,5 +361,5 @@
 	visual_draw2D::getInstance()->init( rootNode, viewer );
 	//osg::ref_ptr<visual_hud> hud = new visual_hud();
-	osg::ref_ptr<visual_debug_hud> hud = new visual_debug_hud();
+	hud = new visual_debug_hud();
 	hud->init( viewer, rootNode );
 	
Index: osgVisual/src/dataIO/visual_dataIO.cpp
===================================================================
--- osgVisual/src/dataIO/visual_dataIO.cpp	(revision 86)
+++ osgVisual/src/dataIO/visual_dataIO.cpp	(revision 87)
@@ -22,5 +22,5 @@
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "visual_dataIO constructed" << std::endl;
-
+	#include <leakDetection.h>
 	initialized = false;
 }
Index: osgVisual/src/distortion/visual_distortion.cpp
===================================================================
--- osgVisual/src/distortion/visual_distortion.cpp	(revision 86)
+++ osgVisual/src/distortion/visual_distortion.cpp	(revision 87)
@@ -22,4 +22,5 @@
 {
 	OSG_NOTIFY (osg::ALWAYS ) << "visual_distortion instantiated." << std::endl;
+	#include <leakDetection.h>
 
 	initialized = false;
Index: osgVisual/src/draw2D/visual_debug_hud.cpp
===================================================================
--- osgVisual/src/draw2D/visual_debug_hud.cpp	(revision 86)
+++ osgVisual/src/draw2D/visual_debug_hud.cpp	(revision 87)
@@ -21,5 +21,5 @@
 visual_debug_hud::visual_debug_hud(void)
 {
-
+	#include <leakDetection.h>
 }
 
@@ -51,6 +51,9 @@
 	if (isInitialized)
 	{	
+		// Remove Draw Content 
+		visual_draw2D::getInstance()->removeDrawContent("HUD");
+
 		// Remove updatecallback
-		this->removeUpdateCallback( updateCallback );
+		this->removeEventCallback( updateCallback );
 		updateCallback = NULL;
 	}
Index: osgVisual/src/draw2D/visual_draw2D.cpp
===================================================================
--- osgVisual/src/draw2D/visual_draw2D.cpp	(revision 86)
+++ osgVisual/src/draw2D/visual_draw2D.cpp	(revision 87)
@@ -22,4 +22,5 @@
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "visual_draw2D constructed" << std::endl;
+	#include <leakDetection.h>
 	initialized = false;
 }
Index: osgVisual/src/draw2D/visual_hud.cpp
===================================================================
--- osgVisual/src/draw2D/visual_hud.cpp	(revision 86)
+++ osgVisual/src/draw2D/visual_hud.cpp	(revision 87)
@@ -21,4 +21,5 @@
 visual_hud::visual_hud(void)
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/draw3D/visual_draw3D.cpp
===================================================================
--- osgVisual/src/draw3D/visual_draw3D.cpp	(revision 86)
+++ osgVisual/src/draw3D/visual_draw3D.cpp	(revision 87)
@@ -21,4 +21,5 @@
 visual_draw3D::visual_draw3D(void)
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/extLink/dataIO_extLinkVCL.cpp
===================================================================
--- osgVisual/src/extLink/dataIO_extLinkVCL.cpp	(revision 86)
+++ osgVisual/src/extLink/dataIO_extLinkVCL.cpp	(revision 87)
@@ -24,4 +24,5 @@
 {
 	OSG_NOTIFY( osg::ALWAYS ) << "extLinkVCL constructed" << std::endl;
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/extLink/manip_extLink.cpp
===================================================================
--- osgVisual/src/extLink/manip_extLink.cpp	(revision 86)
+++ osgVisual/src/extLink/manip_extLink.cpp	(revision 87)
@@ -24,4 +24,5 @@
 extLinkManipulator::extLinkManipulator()
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/manip_ObjectMounted/manip_objectMounted.cpp
===================================================================
--- osgVisual/src/manip_ObjectMounted/manip_objectMounted.cpp	(revision 86)
+++ osgVisual/src/manip_ObjectMounted/manip_objectMounted.cpp	(revision 87)
@@ -25,4 +25,5 @@
 objectMountedManipulator::objectMountedManipulator()
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/manip_Spacemouse/manip_freeSpaceMouse.cpp
===================================================================
--- osgVisual/src/manip_Spacemouse/manip_freeSpaceMouse.cpp	(revision 86)
+++ osgVisual/src/manip_Spacemouse/manip_freeSpaceMouse.cpp	(revision 87)
@@ -25,4 +25,5 @@
 FreeManipulator::FreeManipulator(SpaceMouse* spacemouse) : _spaceMouse(spacemouse)
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp
===================================================================
--- osgVisual/src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp	(revision 86)
+++ osgVisual/src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp	(revision 87)
@@ -25,4 +25,5 @@
 NodeTrackerSpaceMouse::NodeTrackerSpaceMouse(SpaceMouse* spacemouse) : _spaceMouse(spacemouse)
 {
+	#include <leakDetection.h>
     _trackerMode = NODE_CENTER_AND_ROTATION; 
     _rotationMode = TRACKBALL; 
Index: osgVisual/src/manip_Spacemouse/manip_spaceMouse.cpp
===================================================================
--- osgVisual/src/manip_Spacemouse/manip_spaceMouse.cpp	(revision 86)
+++ osgVisual/src/manip_Spacemouse/manip_spaceMouse.cpp	(revision 87)
@@ -168,4 +168,5 @@
 SpaceMouse::SpaceMouse() : _spaceMouseImpl(new SpaceMouseImpl)
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/object/object_updater.cpp
===================================================================
--- osgVisual/src/object/object_updater.cpp	(revision 86)
+++ osgVisual/src/object/object_updater.cpp	(revision 87)
@@ -21,4 +21,5 @@
 object_updater::object_updater(osgVisual::visual_object* object_ )
 {
+	#include <leakDetection.h>
 }
 
Index: osgVisual/src/object/visual_object.cpp
===================================================================
--- osgVisual/src/object/visual_object.cpp	(revision 86)
+++ osgVisual/src/object/visual_object.cpp	(revision 87)
@@ -21,4 +21,6 @@
 visual_object::visual_object( osg::CoordinateSystemNode* sceneRoot_, std::string nodeName_)
 {
+	#include <leakDetection.h>
+
 	// Add this node to Scenegraph
 	sceneRoot_->addChild( this );
Index: osgVisual/src/sky_Silverlining/skySilverLining_cloudsDrawable.cpp
===================================================================
--- osgVisual/src/sky_Silverlining/skySilverLining_cloudsDrawable.cpp	(revision 86)
+++ osgVisual/src/sky_Silverlining/skySilverLining_cloudsDrawable.cpp	(revision 87)
@@ -33,4 +33,5 @@
         : osg::Drawable()
 {
+	#include <leakDetection.h>
     setDataVariance(osg::Object::DYNAMIC);
     setUseVertexBufferObjects(false);
Index: osgVisual/src/sky_Silverlining/skySilverLining_skyDrawable.cpp
===================================================================
--- osgVisual/src/sky_Silverlining/skySilverLining_skyDrawable.cpp	(revision 86)
+++ osgVisual/src/sky_Silverlining/skySilverLining_skyDrawable.cpp	(revision 87)
@@ -36,4 +36,6 @@
 		, _skyboxSize(0)
 {
+	#include <leakDetection.h>
+	
     setDataVariance(osg::Object::DYNAMIC);
     setUseVertexBufferObjects(false);
Index: osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp
===================================================================
--- osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 86)
+++ osgVisual/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 87)
@@ -21,4 +21,7 @@
 visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_)
 {
+	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining..." << std::endl;
+	#include <leakDetection.h>
+
 	atmosphereInitialized = false;
 	postInitialized = false;
