Index: trunk/src/lib/util/loading/factory.cc
===================================================================
--- trunk/src/lib/util/loading/factory.cc	(revision 7201)
+++ trunk/src/lib/util/loading/factory.cc	(revision 7221)
@@ -23,22 +23,14 @@
 //SHELL_COMMAND(create, Factory, fabricate);
 
-
-/*  --------------------------------------------------
- *               Factory
- *   --------------------------------------------------
+/**
+ * @brief constructor
+ *
+ * set everything to zero and define factoryName
  */
-
-/**
- *  constructor
-
-   set everything to zero and define factoryName
-*/
-Factory::Factory (const char* factoryName, ClassID classID)
+Factory::Factory (const std::string& factoryName, ClassID classID)
+  : className(factoryName), classID(classID)
 {
   this->setClassID(CL_FACTORY, "Factory");
   this->setName(factoryName);
-
-  this->classID = classID;
-  this->className = factoryName;
 
   if( Factory::factoryList == NULL)
@@ -48,11 +40,9 @@
 }
 
-/** a reference to the First Factory */
+/** @brief a reference to the First Factory */
 std::list<Factory*>* Factory::factoryList = NULL;
 
 /**
- *  destructor
- *
- * clear the Q
+ * @brief destructor
  */
 Factory::~Factory ()
@@ -64,5 +54,5 @@
 
 /**
- * deletes all the Factories. (cleanup)
+ * @brief deletes all the Factories. (cleanup)
  */
 void Factory::deleteFactories()
@@ -90,5 +80,5 @@
 
 /**
- * Compares the Factories Name against a given ClassName
+ * @brief Compares the Factories Name against a given ClassName
  * @param className the Name of the Class to Query
  * @returns true on match, false otherwise.
@@ -96,10 +86,20 @@
 bool Factory::operator==(const char* className) const
 {
-  return(className != NULL && !strcmp(className, this->className));
+  return(className != NULL && this->className == className);
+}
+
+/**
+ * @brief Compares the Factories Name against a given ClassName
+ * @param className the Name of the Class to Query
+ * @returns true on match, false otherwise.
+ */
+bool Factory::operator==(const std::string& className) const
+{
+  return(this->className == className);
 }
 
 
 /**
- * Creates a new Object of type root->Value() (name)
+ * @brief Creates a new Object of type root->Value() (name)
  * @param root the XML-Root to match for the newly created Object
  * @returns a new Object of Type root->Value() on match, NULL otherwise
@@ -133,7 +133,7 @@
  * @returns a new Object of Type className on match, NULL otherwise
  */
- BaseObject* Factory::fabricate(const char* className)
+ BaseObject* Factory::fabricate(const std::string& className)
 {
-  if (className == NULL || Factory::factoryList == NULL)
+  if (Factory::factoryList == NULL)
     return NULL;
 
@@ -178,5 +178,5 @@
   else
   {
-    PRINTF(2)("Could not Fabricate an Object of ClassID '%h'\n", classID);
+    PRINTF(2)("Could not Fabricate an Object of ClassID '0x%h'\n", classID);
     return NULL;
   }
Index: trunk/src/lib/util/loading/factory.h
===================================================================
--- trunk/src/lib/util/loading/factory.h	(revision 7201)
+++ trunk/src/lib/util/loading/factory.h	(revision 7221)
@@ -27,5 +27,4 @@
 #include "parser/tinyxml/tinyxml.h"
 #include "base_object.h"
-#include "debug.h"
 #include <vector>
 #include <list>
@@ -34,5 +33,5 @@
  * Creates a factory to a Loadable Class.
  * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
-*/
+ */
 #define CREATE_FACTORY(CLASS_NAME, CLASS_ID) \
     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
@@ -49,5 +48,5 @@
   static void deleteFactories();
 
-  static  BaseObject* fabricate(const char* className);
+  static  BaseObject* fabricate(const std::string& className);
   static  BaseObject* fabricate(ClassID classID);
   static  BaseObject* fabricate(const TiXmlElement* root = NULL);
@@ -56,17 +55,18 @@
   bool operator==(ClassID classID) const;
   bool operator==(const char* className) const;
+  bool operator==(const std::string& className) const;
 
   protected:
-    Factory (const char* factoryName, ClassID classID);
+    Factory (const std::string& factoryName, ClassID classID);
     virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
 
   protected:
-    ClassID                       classID;              //!< The Class-Identifyer of the Factory.
-    const char*                   className;            //!< The name of the Class.
+    const ClassID                 classID;              //!< The Class-Identifyer of the Factory.
+    const std::string             className;            //!< The name of the Class.
     static std::list<Factory*>*   factoryList;          //!< List of Registered Factories
 };
 
 /**
- *  a factory that is able to load any kind of Object
+ *  @brief a factory that is able to load any kind of Object
  * (this is a Functor)
  */
@@ -75,5 +75,5 @@
  public:
  /**
-  * creates a new type Factory to enable the loading of T
+  * @brief creates a new type Factory to enable the loading of T
   * @param factoryName the Name of the Factory to load.
   * @param classID the ID of the Class to be created.
@@ -85,5 +85,5 @@
   private:
    /**
-    * fabricates an Object of type T, with the constructor T::T(const TiXmlElemnt*)
+    * @brief fabricates an Object of type T, with the constructor T::T(const TiXmlElemnt*)
     * @param root the TiXmlElement T should load parameters from.
     * @return the newly fabricated T.
Index: trunk/src/lib/util/loading/game_loader.cc
===================================================================
--- trunk/src/lib/util/loading/game_loader.cc	(revision 7201)
+++ trunk/src/lib/util/loading/game_loader.cc	(revision 7221)
@@ -86,12 +86,11 @@
  * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
  */
-ErrorMessage GameLoader::loadCampaign(const char* fileName)
+ErrorMessage GameLoader::loadCampaign(const std::string& fileName)
 {
   ErrorMessage errorCode;
-  char* campaignName = ResourceManager::getFullName(fileName);
-  if (campaignName)
+  std::string campaignName = ResourceManager::getFullName(fileName);
+  if (!campaignName.empty())
     {
       this->currentCampaign = this->fileToCampaign(campaignName);
-      delete[] campaignName;
     }
 }
@@ -105,12 +104,11 @@
  * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
  */
-ErrorMessage GameLoader::loadNetworkCampaign(const char* fileName)
+ErrorMessage GameLoader::loadNetworkCampaign(const std::string& fileName)
 {
   ErrorMessage errorCode;
-  char* campaignName = ResourceManager::getFullName(fileName);
-  if (campaignName)
+  std::string campaignName = ResourceManager::getFullName(fileName);
+  if (!campaignName.empty())
   {
     this->currentCampaign = this->fileToCampaign(campaignName);
-    delete[] campaignName;
   }
 }
@@ -220,5 +218,5 @@
  * this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
  */
-Campaign* GameLoader::fileToCampaign(const char* fileName)
+Campaign* GameLoader::fileToCampaign(const std::string& fileName)
 {
   /* do not entirely load the campaign. just the current world
@@ -227,5 +225,5 @@
   */
 
-  if( fileName == NULL)
+  if( fileName.empty())
     {
       PRINTF(2)("No filename specified for loading");
@@ -233,16 +231,15 @@
     }
 
-  TiXmlDocument* XMLDoc = new TiXmlDocument( fileName);
+  TiXmlDocument XMLDoc(fileName);
   // load the campaign document
-  if( !XMLDoc->LoadFile())
+  if( !XMLDoc.LoadFile(fileName))
     {
       // report an error
-      PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
-      delete XMLDoc;
+      PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
       return NULL;
     }
 
   // check basic validity
-  TiXmlElement* root = XMLDoc->RootElement();
+  TiXmlElement* root = XMLDoc.RootElement();
   assert( root != NULL);
 
@@ -251,15 +248,9 @@
       // report an error
       PRINTF(2)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n");
-      delete XMLDoc;
       return NULL;
     }
 
   // construct campaign
-  Campaign* c = new Campaign( root);
-
-  // free the XML data
-  delete XMLDoc;
-
-  return c;
+  return new Campaign( root);
 }
 
Index: trunk/src/lib/util/loading/game_loader.h
===================================================================
--- trunk/src/lib/util/loading/game_loader.h	(revision 7201)
+++ trunk/src/lib/util/loading/game_loader.h	(revision 7221)
@@ -44,7 +44,7 @@
   static GameLoader* getInstance() { if(singletonRef == NULL) singletonRef = new GameLoader(); return singletonRef; }
 
-  ErrorMessage loadCampaign(const char* name);
+  ErrorMessage loadCampaign(const std::string& name);
   ErrorMessage loadDebugCampaign(Uint32 campaignID);
-  ErrorMessage loadNetworkCampaign(const char* fileName);
+  ErrorMessage loadNetworkCampaign(const std::string& fileName);
 
   ErrorMessage init();
@@ -62,5 +62,5 @@
   GameLoader ();
 
-  Campaign* fileToCampaign(const char* name);
+  Campaign* fileToCampaign(const std::string& name);
 
 
Index: trunk/src/lib/util/loading/load_param.cc
===================================================================
--- trunk/src/lib/util/loading/load_param.cc	(revision 7201)
+++ trunk/src/lib/util/loading/load_param.cc	(revision 7221)
@@ -28,7 +28,7 @@
  * @param executor the Executor, that executes the loading procedure.
  */
-CLoadParam::CLoadParam(const TiXmlElement* root, const char* paramName, BaseObject* object, const Executor& executor, bool inLoadCycle)
-{
-  this->paramName = paramName;
+CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, const Executor& executor, bool inLoadCycle)
+  :  paramName(paramName), object(object)
+{
   this->object = object;
   this->inLoadCycle = inLoadCycle;
@@ -37,6 +37,5 @@
   if (likely(!inLoadCycle))
     this->loadElem = grabParameterElement(root, paramName);
-  //this->loadString = grabParameter(root, paramName);
-  else if (!strcmp(root->Value(), paramName))
+  else if (paramName == root->Value())
     this->loadElem = (TiXmlElement*)root->FirstChild();
   else
@@ -46,6 +45,6 @@
   this->executor = executor.clone();
 
-  if (this->executor)
-    this->executor->setName(paramName);
+  //if (this->executor)
+  //  this->executor->setName(paramName);
 }
 
@@ -60,14 +59,13 @@
   if (likely(this->executor != NULL))
   {
+    std::string loadString = "";
     if (this->loadElem != NULL &&  this->loadElem->ToText())
-      this->loadString = this->loadElem->Value();
-    else
-      this->loadString = NULL;
+      loadString = this->loadElem->Value();
     if (likely(this->object != NULL) &&
-        ( this->loadString != NULL ||
+        ( !loadString.empty() ||
           ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
     {
-      PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, this->loadString, this->object->getName(), this->object->getClassName());
-      this->executor->execute(this->object, this->loadString);
+      PRINTF(4)("Loading value '%s' with Parameters '%s' onto: %s::%s\n", this->paramName.c_str(), loadString.c_str(), this->object->getClassName(), this->object->getName());
+      this->executor->execute(this->object, loadString);
     }
     delete this->executor;
@@ -99,7 +97,7 @@
  * @returns a pointer to itself.
 */
-CLoadParam& CLoadParam::describe(const char* descriptionText)
-{
-  if (LoadClassDescription::parametersDescription && this->paramDesc && !this->paramDesc->getDescription())
+CLoadParam& CLoadParam::describe(const std::string& descriptionText)
+{
+  if (LoadClassDescription::parametersDescription && this->paramDesc && this->paramDesc->getDescription().empty())
   {
     this->paramDesc->setDescription(descriptionText);
@@ -230,15 +228,14 @@
  * @returns the Value of the parameter if found, NULL otherwise
 */
-const char* grabParameter(const TiXmlElement* root, const char* parameterName)
+std::string grabParameter(const TiXmlElement* root, const std::string& parameterName)
 {
   const TiXmlElement* element;
   const TiXmlNode* node;
 
-  if (root == NULL || parameterName == NULL)
-    return NULL;
-  assert( parameterName != NULL);
+  if (root == NULL)
+    return "";
 
   element = root->FirstChildElement( parameterName);
-  if( element == NULL) return NULL;
+  if( element == NULL) return "";
 
   node = element->FirstChild();
@@ -248,5 +245,5 @@
     node = node->NextSibling();
   }
-  return NULL;
+  return "";
 }
 
@@ -256,12 +253,11 @@
  * @returns the Element of the parameter if found, NULL otherwise
  */
-const TiXmlElement* grabParameterElement(const TiXmlElement* root, const char* parameterName)
+const TiXmlElement* grabParameterElement(const TiXmlElement* root, const std::string& parameterName)
 {
   const TiXmlElement* element;
   const TiXmlNode* node;
 
-  if (root == NULL || parameterName == NULL)
+  if (root == NULL)
     return NULL;
-  assert( parameterName != NULL);
 
   element = root->FirstChildElement( parameterName);
Index: trunk/src/lib/util/loading/load_param.h
===================================================================
--- trunk/src/lib/util/loading/load_param.h	(revision 7201)
+++ trunk/src/lib/util/loading/load_param.h	(revision 7221)
@@ -87,12 +87,12 @@
 {
   public:
-    CLoadParam(const TiXmlElement* root, const char* paramName, BaseObject* object, const Executor& executor, bool inLoadCycle = false);
+    CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, const Executor& executor, bool inLoadCycle = false);
     virtual ~CLoadParam();
 
-    CLoadParam& describe(const char* descriptionText);
+    CLoadParam& describe(const std::string& descriptionText);
     CLoadParam& defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
                               const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
                               const MultiType& value4 = MT_NULL);
-    CLoadParam& attribute(const char* attributeName, const Executor& executor);
+    CLoadParam& attribute(const std::string& attributeName, const Executor& executor);
 
 
@@ -101,10 +101,9 @@
     Executor*                executor;
     BaseObject*              object;
-    const char*              paramName;
+    const std::string        paramName;
 
     LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this CLoadParameter
     LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
     const TiXmlElement*      loadElem;             //!< The Element to load.
-    const char*              loadString;           //!< The string loaded by this LoadParam
     const void*              pointerToParam;       //!< A Pointer to a Parameter.
 
@@ -114,6 +113,6 @@
 // helper function
 
-const char* grabParameter(const TiXmlElement* root, const char* parameterName);
-const TiXmlElement* grabParameterElement(const TiXmlElement* root, const char* parameterName);
+std::string grabParameter(const TiXmlElement* root, const std::string& parameterName);
+const TiXmlElement* grabParameterElement(const TiXmlElement* root, const std::string& parameterName);
 
 #endif /* _LOAD_PARAM_H */
Index: trunk/src/lib/util/loading/load_param_description.cc
===================================================================
--- trunk/src/lib/util/loading/load_param_description.cc	(revision 7201)
+++ trunk/src/lib/util/loading/load_param_description.cc	(revision 7221)
@@ -22,11 +22,9 @@
  * @param paramName the name of the parameter to load
  */
-LoadParamDescription::LoadParamDescription(const char* paramName)
+LoadParamDescription::LoadParamDescription(const std::string& paramName)
 {
   this->types = NULL;
-  this->description = NULL;
   this->defaultValues = NULL;
-  this->paramName = new char[strlen(paramName)+1];
-  strcpy(this->paramName, paramName);
+  this->paramName = paramName;
 }
 
@@ -46,6 +44,4 @@
   delete[] this->types;
   delete[] this->defaultValues;
-  delete[] this->paramName;
-  delete[] this->description;
 }
 
@@ -53,8 +49,7 @@
  * @param descriptionText The text to set as a description for this Parameter
  */
-void LoadParamDescription::setDescription(const char* descriptionText)
-{
-  this->description = new char[strlen(descriptionText)+1];
-  strcpy(this->description, descriptionText);
+void LoadParamDescription::setDescription(const std::string& descriptionText)
+{
+  this->description = descriptionText;
 }
 
@@ -64,5 +59,5 @@
 void LoadParamDescription::print() const
 {
-  PRINT(3)(" <%s>", this->paramName);
+  PRINT(3)(" <%s>", this->paramName.c_str());
   for (int i = 0; i < this->paramCount; i++)
   {
@@ -101,7 +96,7 @@
 //     }
   }
-  PRINT(3)("</%s>", this->paramName);
-  if (this->description)
-    PRINT(3)(" -- %s", this->description);
+  PRINT(3)("</%s>", this->paramName.c_str());
+  if (!this->description.empty())
+    PRINT(3)(" -- %s", this->description.c_str());
   // default values
   if (this->paramCount > 0)
@@ -139,8 +134,7 @@
  * @param className the name of the class to be loadable
  */
-LoadClassDescription::LoadClassDescription(const char* className)
-{
-  this->className = new char[strlen(className)+1];
-  strcpy(this->className, className);
+LoadClassDescription::LoadClassDescription(const std::string& className)
+{
+  this->className = className;
 
   if (LoadClassDescription::classList == NULL)
@@ -161,6 +155,4 @@
     this->paramList.pop_front();
   }
-
-  delete[] this->className;
 }
 
@@ -187,5 +179,5 @@
    Otherwise it returns a new classDescription
  */
-LoadClassDescription* LoadClassDescription::addClass(const char* className)
+LoadClassDescription* LoadClassDescription::addClass(const std::string& className)
 {
   if (LoadClassDescription::classList != NULL)
@@ -194,5 +186,5 @@
     while (it != LoadClassDescription::classList->end())
     {
-      if (!strcmp((*it)->className, className))
+      if ((*it)->className == className)
       {
         return (*it);
@@ -205,13 +197,13 @@
 
 /**
- *  does the same as addClass(const char* className), but with params
+ *  does the same as addClass(const std::string& className), but with params
  * @param paramName the name of the parameter to add.
  */
-LoadParamDescription* LoadClassDescription::addParam(const char* paramName)
+LoadParamDescription* LoadClassDescription::addParam(const std::string& paramName)
 {
   std::list<LoadParamDescription*>::iterator it = this->paramList.begin();
   while (it != this->paramList.end())
   {
-    if (!strcmp((*it)->paramName, paramName))
+    if ((*it)->paramName == paramName)
     {
       return NULL;
@@ -231,5 +223,5 @@
  * @todo implement it
  */
-void LoadClassDescription::printAll(const char* fileName)
+void LoadClassDescription::printAll(const std::string& fileName)
 {
   PRINT(3)("===============================================================\n");
@@ -240,5 +232,5 @@
     while (classDesc != LoadClassDescription::classList->end())
     {
-      PRINT(3)("<%s>\n", (*classDesc)->className);
+      PRINT(3)("<%s>\n", (*classDesc)->className.c_str());
       std::list<LoadParamDescription*>::iterator param = (*classDesc)->paramList.begin();
       while (param != (*classDesc)->paramList.end())
@@ -247,5 +239,5 @@
         param++;
       }
-      PRINT(3)("</%s>\n\n", (*classDesc)->className);
+      PRINT(3)("</%s>\n\n", (*classDesc)->className.c_str());
       classDesc++;
     }
@@ -262,10 +254,10 @@
  * !! The strings MUST NOT be deleted !!
  */
-std::list<const char*> LoadClassDescription::searchClassWithShort(const char* classNameBegin)
+std::list<std::string> LoadClassDescription::searchClassWithShort(const std::string& classNameBegin)
 {
   /// FIXME
   // NOT USED
 /*  unsigned int searchLength = strlen(classNameBegin);
-  std::list<const char*> retVal;
+  std::list<const std::string&> retVal;
 
   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
Index: trunk/src/lib/util/loading/load_param_description.h
===================================================================
--- trunk/src/lib/util/loading/load_param_description.h	(revision 7201)
+++ trunk/src/lib/util/loading/load_param_description.h	(revision 7221)
@@ -36,19 +36,19 @@
   friend class LoadParam;
   friend class LoadClassDescription;
- public:
-  LoadParamDescription(const char* paramName);
+public:
+  LoadParamDescription(const std::string& paramName);
   ~LoadParamDescription();
 
-  void setDescription(const char* descriptionText);
+  void setDescription(const std::string& descriptionText);
   /** @returns the descriptionString */
-  const char* getDescription() { return this->description; };
+  const std::string& getDescription() { return this->description; };
 
   void print() const;
 
- private:
-  char*         paramName;             //!< The name of the parameter.
+private:
+  std::string   paramName;             //!< The name of the parameter.
   int           paramCount;            //!< The count of parameters.
   int*          types;                 //!< What kind of parameters does this function take ??
-  char*         description;           //!< A longer description about this function.
+  std::string   description;           //!< A longer description about this function.
   char**        defaultValues;         //!< The 'Default Values'. @TODO MAKE THIS A MULTITYPE
 };
@@ -58,21 +58,21 @@
 {
   friend class CLoadParam;
- public:
-  LoadClassDescription(const char* className);
+public:
+  LoadClassDescription(const std::string& className);
   ~LoadClassDescription();
 
-  static LoadClassDescription* addClass(const char* className);
-  LoadParamDescription* addParam(const char* paramName);
+  static LoadClassDescription* addClass(const std::string& className);
+  LoadParamDescription* addParam(const std::string& paramName);
 
   static void deleteAllDescriptions();
 
-  static void printAll(const char* fileName = NULL);
-  static std::list<const char*> searchClassWithShort(const char* classNameBegin);
-//  static const LoadParamDescription* getClass(const char* className);
+  static void printAll(const std::string& fileName = "");
+  static std::list<std::string> searchClassWithShort(const std::string& classNameBegin);
+  //  static const LoadParamDescription* getClass(const std::string& className);
 
- private:
+private:
   static bool                              parametersDescription;  //!< if parameter-description should be enabled.
   static std::list<LoadClassDescription*>* classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
-  char*                                    className;              //!< name of the class
+  std::string                              className;              //!< name of the class
 
   std::list<LoadParamDescription*>         paramList;              //!< List of parameters this class knows.
Index: trunk/src/lib/util/loading/resource_manager.cc
===================================================================
--- trunk/src/lib/util/loading/resource_manager.cc	(revision 7201)
+++ trunk/src/lib/util/loading/resource_manager.cc	(revision 7221)
@@ -59,9 +59,7 @@
   this->setName("ResourceManager");
 
-  this->dataDir = new char[3];
-  strcpy(this->dataDir, "./");
+  this->dataDir = "./";
+  this->_cwd = "";
   this->tryDataDir("./data");
-
-  this->_cwd = NULL;
 }
 
@@ -80,14 +78,4 @@
     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
 
-  // deleting the Directorie Lists
-  while (!this->imageDirs.empty())
-  {
-    delete[] this->imageDirs.back();
-    this->imageDirs.pop_back();
-  }
-
-  delete[] this->dataDir;
-  if (this->_cwd)
-    delete[] this->_cwd;
   ResourceManager::singletonRef = NULL;
 }
@@ -97,29 +85,23 @@
  * @param dataDir the DataDirectory.
  */
-bool ResourceManager::setDataDir(const char* dataDir)
-{
-  char* realDir = ResourceManager::homeDirCheck(dataDir);
+bool ResourceManager::setDataDir(const std::string& dataDir)
+{
+  std::string realDir = ResourceManager::homeDirCheck(dataDir);
   if (isDir(realDir))
   {
-    delete[] this->dataDir;
-    if (dataDir[strlen(dataDir)-1] == '/' || dataDir[strlen(dataDir)-1] == '\\')
+    if (dataDir[dataDir.size()-1] == '/' || dataDir[dataDir.size()-1] == '\\')
     {
-      this->dataDir = new char[strlen(realDir)+1];
-      strcpy(this->dataDir, realDir);
+      this->dataDir = realDir;
     }
     else
     {
-      this->dataDir = new char[strlen(realDir)+2];
-      strcpy(this->dataDir, realDir);
-      this->dataDir[strlen(realDir)] = '/';
-      this->dataDir[strlen(realDir)+1] = '\0';
+      this->dataDir = realDir;
+      this->dataDir += '/';
     }
-    delete[] realDir;
     return true;
   }
   else
   {
-    PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", realDir, this->dataDir);
-    delete[] realDir;
+    PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", realDir.c_str(), this->dataDir.c_str());
     return false;
   }
@@ -132,26 +114,20 @@
  * this is essentially the same as setDataDir, but it ommits the error-message
  */
-bool ResourceManager::tryDataDir(const char* dataDir)
-{
-  char* realDir = ResourceManager::homeDirCheck(dataDir);
+bool ResourceManager::tryDataDir(const std::string& dataDir)
+{
+  std::string realDir = ResourceManager::homeDirCheck(dataDir);
   if (isDir(realDir))
   {
-    delete[] this->dataDir;
-    if (dataDir[strlen(dataDir)-1] == '/' || dataDir[strlen(dataDir)-1] == '\\')
+    if (dataDir[dataDir.size()-1] == '/' || dataDir[dataDir.size()-1] == '\\')
     {
-      this->dataDir = new char[strlen(realDir)+1];
-      strcpy(this->dataDir, realDir);
+      this->dataDir = realDir;
     }
     else
     {
-      this->dataDir = new char[strlen(realDir)+2];
-      strcpy(this->dataDir, realDir);
-      this->dataDir[strlen(realDir)] = '/';
-      this->dataDir[strlen(realDir)+1] = '\0';
+      this->dataDir = realDir;
+      this->dataDir += '/';
     }
-    delete[] realDir;
     return true;
   }
-  delete[] realDir;
   return false;
 }
@@ -162,17 +138,15 @@
  * @param fileInside is iniside of the given directory.
 */
-bool ResourceManager::verifyDataDir(const char* fileInside)
+bool ResourceManager::verifyDataDir(const std::string& fileInside)
 {
   bool retVal;
   if (!isDir(this->dataDir))
   {
-    PRINTF(1)("%s is not a directory\n", this->dataDir);
-    return false;
-  }
-
-  char* testFile = new char[strlen(this->dataDir)+strlen(fileInside)+1];
-  sprintf(testFile, "%s%s", this->dataDir, fileInside);
+    PRINTF(1)("%s is not a directory\n", this->dataDir.c_str());
+    return false;
+  }
+
+  std::string testFile = this->dataDir + fileInside;
   retVal = isFile(testFile);
-  delete[] testFile;
   return retVal;
 }
@@ -185,21 +159,15 @@
    false otherwise
 */
-bool ResourceManager::addImageDir(const char* imageDir)
-{
-  if (imageDir == NULL)
-    return false;
-
-  char* newDir;
-  if (imageDir[strlen(imageDir)-1] == '/' || imageDir[strlen(imageDir)-1] == '\\')
-  {
-    newDir = new char[strlen(imageDir)+1];
-    strcpy(newDir, imageDir);
-  }
-  else
-  {
-    newDir = new char[strlen(imageDir)+2];
-    strcpy(newDir, imageDir);
-    newDir[strlen(imageDir)] = '/';
-    newDir[strlen(imageDir)+1] = '\0';
+bool ResourceManager::addImageDir(const std::string& imageDir)
+{
+  std::string newDir;
+  if (imageDir[imageDir.size()-1] == '/' || imageDir[imageDir.size()-1] == '\\')
+  {
+    newDir = imageDir;
+  }
+  else
+  {
+    newDir = imageDir;
+    newDir += '/';
   }
   // check if the param is a Directory
@@ -207,11 +175,10 @@
   {
     // check if the Directory has been added before
-    std::vector<char*>::const_iterator imageDir;
+    std::vector<std::string>::const_iterator imageDir;
     for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
     {
-      if (!strcmp(*imageDir, newDir))
+      if (*imageDir == newDir)
       {
-        PRINTF(3)("Path %s already loaded\n", newDir);
-        delete[] newDir;
+        PRINTF(3)("Path %s already loaded\n", newDir.c_str());
         return true;
       }
@@ -223,6 +190,5 @@
   else
   {
-    PRINTF(1)("%s is not a Directory, and can not be added to the Paths of Images\n", newDir);
-    delete[] newDir;
+    PRINTF(1)("%s is not a Directory, and can not be added to the Paths of Images\n", newDir.c_str());
     return false;
   }
@@ -239,21 +205,19 @@
  * @returns a pointer to a desired Resource.
 */
-BaseObject* ResourceManager::load(const char* fileName, ResourcePriority prio,
+BaseObject* ResourceManager::load(const std::string& fileName, ResourcePriority prio,
                                   const MultiType& param0, const MultiType& param1, const MultiType& param2)
 {
-  if (fileName == NULL)
-    return NULL;
   ResourceType tmpType;
 #ifndef NO_MODEL
 #define __IF_OK
-  if (!strncasecmp(fileName+(strlen(fileName)-4), ".obj", 4))
+  if (!strncasecmp(fileName.c_str()+(fileName.size()-4), ".obj", 4))
     tmpType = OBJ;
-  else if (!strncmp(fileName+(strlen(fileName)-4), ".md2", 4))
+  else if (!strncmp(fileName.c_str()+(fileName.size()-4), ".md2", 4))
     tmpType = MD2;
-  else if (!strcasecmp(fileName, "cube") ||
-           !strcasecmp(fileName, "sphere") ||
-           !strcasecmp(fileName, "plane") ||
-           !strcasecmp(fileName, "cylinder") ||
-           !strcasecmp(fileName, "cone"))
+  else if (!strcasecmp(fileName.c_str(), "cube") ||
+            !strcasecmp(fileName.c_str(), "sphere") ||
+            !strcasecmp(fileName.c_str(), "plane") ||
+            !strcasecmp(fileName.c_str(), "cylinder") ||
+            !strcasecmp(fileName.c_str(), "cone"))
     tmpType = PRIM;
 #endif /* NO_MODEL */
@@ -263,9 +227,9 @@
 #endif
 #define __IF_OK
-    if (!strncasecmp(fileName+(strlen(fileName)-4), ".wav", 4))
+    if (!strncasecmp(fileName.c_str()+(fileName.size()-4), ".wav", 4))
       tmpType = WAV;
-    else if (!strncasecmp(fileName+(strlen(fileName)-4), ".mp3", 4))
+    else if (!strncasecmp(fileName.c_str()+(fileName.size()-4), ".mp3", 4))
       tmpType = MP3;
-    else if (!strncasecmp(fileName+(strlen(fileName)-4), ".ogg", 4))
+    else if (!strncasecmp(fileName.c_str()+(fileName.size()-4), ".ogg", 4))
       tmpType = OGG;
 #endif /* NO_AUDIO */
@@ -275,5 +239,5 @@
 #endif
 #define __IF_OK
-      if (!strncasecmp(fileName+(strlen(fileName)-4), ".ttf", 4))
+      if (!strncasecmp(fileName.c_str()+(fileName.size()-4), ".ttf", 4))
         tmpType = TTF;
 #endif /* NO_TEXT */
@@ -283,5 +247,5 @@
 #endif
 #define __IF_OK
-        if (!strncasecmp(fileName+(strlen(fileName)-5), ".vert", 5))
+        if (!strncasecmp(fileName.c_str()+(fileName.size()-5), ".vert", 5))
           tmpType = SHADER;
 #endif /* NO_SHADERS */
@@ -308,9 +272,7 @@
  * during the initialisation instead of at Runtime.
  */
-bool ResourceManager::cache(const char* fileName, ResourceType type, ResourcePriority prio,
+bool ResourceManager::cache(const std::string& fileName, ResourceType type, ResourcePriority prio,
                             const MultiType& param0, const MultiType& param1, const MultiType& param2)
 {
-  assert(fileName != NULL);
-
   // searching if the resource was loaded before.
   Resource* tmpResource;
@@ -359,8 +321,7 @@
  * @returns a pointer to a desired Resource.
 */
-BaseObject* ResourceManager::load(const char* fileName, ResourceType type, ResourcePriority prio,
+BaseObject* ResourceManager::load(const std::string& fileName, ResourceType type, ResourcePriority prio,
                                   const MultiType& param0, const MultiType& param1, const MultiType& param2)
 {
-  assert(fileName != NULL);
 
   // searching if the resource was loaded before.
@@ -397,5 +358,5 @@
  * @returns a pointer to a desired Resource.
  */
-Resource* ResourceManager::loadResource(const char* fileName, ResourceType type, ResourcePriority prio,
+Resource* ResourceManager::loadResource(const std::string& fileName, ResourceType type, ResourcePriority prio,
                                         const MultiType& param0, const MultiType& param1, const MultiType& param2)
 {
@@ -406,9 +367,8 @@
   tmpResource->prio = prio;
   tmpResource->pointer = NULL;
-  tmpResource->name = new char[strlen(fileName)+1];
-  strcpy(tmpResource->name, fileName);
+  tmpResource->name = fileName;
 
   // creating the full name. (directoryName + FileName)
-  char* fullName = ResourceManager::getFullName(fileName);
+  std::string fullName = ResourceManager::getFullName(fileName);
   // Checking for the type of resource \see ResourceType
   switch(type)
@@ -425,5 +385,5 @@
       else
       {
-        PRINTF(2)("File %s in %s does not exist. Loading a cube-Model instead\n", fileName, dataDir);
+        PRINTF(2)("File %s in %s does not exist. Loading a cube-Model instead\n", fileName.c_str(), dataDir.c_str());
         tmpResource->pointer = ResourceManager::load("cube", PRIM, prio, tmpResource->param[0].getFloat());
       }
@@ -435,13 +395,13 @@
         tmpResource->param[0] = 1.0f;
 
-      if (!strcmp(tmpResource->name, "cube"))
+      if (tmpResource->name == "cube")
         tmpResource->pointer = new PrimitiveModel(PRIM_CUBE, tmpResource->param[0].getFloat());
-      else if (!strcmp(tmpResource->name, "sphere"))
+      else if (tmpResource->name == "sphere")
         tmpResource->pointer = new PrimitiveModel(PRIM_SPHERE, tmpResource->param[0].getFloat());
-      else if (!strcmp(tmpResource->name, "plane"))
+      else if (tmpResource->name == "plane")
         tmpResource->pointer = new PrimitiveModel(PRIM_PLANE, tmpResource->param[0].getFloat());
-      else if (!strcmp(tmpResource->name, "cylinder"))
+      else if (tmpResource->name == "cylinder")
         tmpResource->pointer = new PrimitiveModel(PRIM_CYLINDER, tmpResource->param[0].getFloat());
-      else if (!strcmp(tmpResource->name, "cone"))
+      else if (tmpResource->name == "cone")
         tmpResource->pointer = new PrimitiveModel(PRIM_CONE, tmpResource->param[0].getFloat());
       break;
@@ -468,5 +428,5 @@
         tmpResource->pointer = new Font(fullName, (unsigned int) tmpResource->param[0].getInt());
       else
-        PRINTF(2)("%s does not exist in %s. Not loading Font\n", fileName, this->dataDir);
+        PRINTF(2)("%s does not exist in %s. Not loading Font\n", fileName.c_str(), this->dataDir.c_str());
       break;
 #endif /* NO_TEXT */
@@ -494,21 +454,18 @@
       else
       {
-        std::vector<char*>::iterator imageDir;
+        std::vector<std::string>::iterator imageDir;
         for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
         {
-          char* imgName = new char[strlen(*imageDir)+strlen(fileName)+1];
-          sprintf(imgName, "%s%s", *imageDir, fileName);
+          std::string imgName = *imageDir + fileName;
           if(isFile(imgName))
           {
             PRINTF(4)("Image %s resides to %s\n", fileName, imgName);
             tmpResource->pointer = new Texture(imgName, tmpResource->param[0].getInt());
-            delete[] imgName;
             break;
           }
-          delete[] imgName;
         }
       }
       if(!tmpResource)
-        PRINTF(2)("!!Image %s not Found!!\n", fileName);
+        PRINTF(2)("!!Image %s not Found!!\n", fileName.c_str());
       break;
 #endif /* NO_TEXTURES */
@@ -520,5 +477,5 @@
         {
           MultiType param = param0; /// HACK
-          char* secFullName = ResourceManager::getFullName(param.getCString());
+          std::string secFullName = ResourceManager::getFullName(param.getCString());
           if (ResourceManager::isFile(secFullName))
           {
@@ -526,10 +483,9 @@
             tmpResource->pointer = new Shader(fullName, secFullName);
           }
-          delete[] secFullName;
         }
         else
         {
           tmpResource->param[0] = param0;
-          tmpResource->pointer = new Shader(fullName, NULL);
+          tmpResource->pointer = new Shader(fullName, "");
         }
       }
@@ -538,11 +494,9 @@
     default:
       tmpResource->pointer = NULL;
-      PRINTF(1)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet. JUST DO IT!!\n", tmpResource->name);
+      PRINTF(1)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet. JUST DO IT!!\n", tmpResource->name.c_str());
       break;
   }
   if (tmpResource->pointer != NULL)
     this->resourceList.push_back(tmpResource);
-  delete[] fullName;
-
 
   if (tmpResource->pointer != NULL)
@@ -550,6 +504,5 @@
   else
   {
-    PRINTF(2)("Resource %s could not be loaded\n", fileName);
-    delete[] tmpResource->name;
+    PRINTF(2)("Resource %s could not be loaded\n", fileName.c_str());
     delete tmpResource;
     return NULL;
@@ -597,6 +550,5 @@
       delete resource->pointer;
       // deleting the List Entry:
-      PRINTF(4)("Resource %s safely removed.\n", resource->name);
-      delete[] resource->name;
+      PRINTF(4)("Resource %s safely removed.\n", resource->name.c_str());
       std::vector<Resource*>::iterator resourceIT = std::find(this->resourceList.begin(), this->resourceList.end(), resource);
       this->resourceList.erase(resourceIT);
@@ -604,8 +556,8 @@
     }
     else
-      PRINTF(4)("Resource %s not removed, because there are still %d References to it.\n", resource->name, resource->count);
-  }
-  else
-    PRINTF(4)("not deleting resource %s because DeleteLevel to high\n", resource->name);
+      PRINTF(4)("Resource %s not removed, because there are still %d References to it.\n", resource->name.c_str(), resource->count);
+  }
+  else
+    PRINTF(4)("not deleting resource %s because DeleteLevel to high\n", resource->name.c_str());
   return true;
 }
@@ -633,5 +585,5 @@
           if (round == 3)
             PRINTF(2)("unable to unload %s because there are still %d references to it\n",
-                      this->resourceList[index]->name, this->resourceList[index]->count);
+                      this->resourceList[index]->name.c_str(), this->resourceList[index]->count);
           removeCount++;
         }
@@ -653,5 +605,5 @@
  * @returns a Pointer to the Resource if found, NULL otherwise.
 */
-Resource* ResourceManager::locateResourceByInfo(const char* fileName, ResourceType type,
+Resource* ResourceManager::locateResourceByInfo(const std::string& fileName, ResourceType type,
     const MultiType& param0, const MultiType& param1, const MultiType& param2) const
 {
@@ -659,5 +611,5 @@
   for (resource = this->resourceList.begin(); resource != this->resourceList.end(); resource++)
   {
-    if ((*resource)->type == type && !strcmp(fileName, (*resource)->name))
+    if ((*resource)->type == type && fileName == (*resource)->name)
     {
       bool match = false;
@@ -743,15 +695,15 @@
 }
 
-char* ResourceManager::toResourcableString(unsigned int i)
-{
-  int len = strlen(ResourceManager::ResourceTypeToChar(this->resourceList[i]->type));
-  len += strlen(this->resourceList[i]->name);
+std::string ResourceManager::toResourcableString(unsigned int i)
+{
+/*  int len = strlen(ResourceManager::ResourceTypeToChar(this->resourceList[i]->type));
+  len += this->resourceList[i]->name.size();
   if (this->resourceList[i]->param[0].getCString()) len += strlen(this->resourceList[i]->param[0].getCString()) +1;
   if (this->resourceList[i]->param[1].getCString()) len += strlen(this->resourceList[i]->param[1].getCString()) +1;
   if (this->resourceList[i]->param[2].getCString()) len += strlen(this->resourceList[i]->param[2].getCString()) +1;
   len += 10;
-  char* tmp = new char[len];
+  std::string tmp = new char[len];
   tmp[0] = '\0';
-  strcat( tmp, ResourceManager::ResourceTypeToChar(this->resourceList[i]->type));
+  strcat(tmp, ResourceManager::ResourceTypeToChar(this->resourceList[i]->type));
   strcat(tmp,",");
   strcat (tmp, this->resourceList[i]->name);
@@ -771,5 +723,5 @@
     strcat( tmp, this->resourceList[i]->param[2].getCString());
   }
-  return tmp;
+  return tmp;*/
 }
 
@@ -778,7 +730,7 @@
  * @param resourceableString the String to cache the resource from.
  */
-bool ResourceManager::fromResourceableString(const char* resourceableString)
-{
-  SubString splits(resourceableString, ',');
+bool ResourceManager::fromResourceableString(const std::string& resourceableString)
+{
+/*  SubString splits(resourceableString, ',');
   splits.debug();
   if (splits.getCount() == 2)
@@ -793,5 +745,5 @@
   else if (splits.getCount() == 5)
     return this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]),
-                RP_LEVEL, splits[2], splits[3], splits[4]);
+                RP_LEVEL, splits[2], splits[3], splits[4]);*/
 }
 
@@ -802,27 +754,17 @@
  * @returns true if it is a directory/symlink false otherwise
 */
-bool ResourceManager::isDir(const char* directoryName)
-{
-  if (directoryName == NULL)
-    return false;
-
-  char* tmpDirName = NULL;
+bool ResourceManager::isDir(const std::string& directoryName)
+{
+  std::string tmpDirName = directoryName;
   struct stat status;
 
   // checking for the termination of the string given. If there is a "/" at the end cut it away
-  if (directoryName[strlen(directoryName)-1] == '/' ||
-      directoryName[strlen(directoryName)-1] == '\\')
-  {
-    tmpDirName = new char[strlen(directoryName)];
-    strncpy(tmpDirName, directoryName, strlen(directoryName)-1);
-    tmpDirName[strlen(directoryName)-1] = '\0';
-  }
-  else
-  {
-    tmpDirName = new char[strlen(directoryName)+1];
-    strcpy(tmpDirName, directoryName);
-  }
-
-  if(!stat(tmpDirName, &status))
+  if (directoryName[directoryName.size()-1] == '/' ||
+      directoryName[directoryName.size()-1] == '\\')
+  {
+    tmpDirName.erase(tmpDirName.size()-1);
+  }
+
+  if(!stat(tmpDirName.c_str(), &status))
   {
     if (status.st_mode & (S_IFDIR
@@ -832,18 +774,11 @@
                          ))
     {
-      delete[] tmpDirName;
       return true;
     }
     else
-    {
-      delete[] tmpDirName;
       return false;
-    }
-  }
-  else
-  {
-    delete[] tmpDirName;
-    return false;
-  }
+  }
+  else
+    return false;
 }
 
@@ -853,12 +788,12 @@
  * @returns true if it is a regular file/symlink, false otherwise
 */
-bool ResourceManager::isFile(const char* fileName)
-{
-  if (fileName == NULL)
-    return false;
-  char* tmpFileName = ResourceManager::homeDirCheck(fileName);
+bool ResourceManager::isFile(const std::string& fileName)
+{
+  if (fileName.empty())
+    return false;
+  std::string tmpFileName = ResourceManager::homeDirCheck(fileName);
   // actually checks the File
   struct stat status;
-  if (!stat(tmpFileName, &status))
+  if (!stat(tmpFileName.c_str(), &status))
   {
     if (status.st_mode & (S_IFREG
@@ -868,18 +803,11 @@
                          ))
     {
-      delete[] tmpFileName;
       return true;
     }
     else
-    {
-      delete[] tmpFileName;
       return false;
-    }
-  }
-  else
-  {
-    delete[] tmpFileName;
-    return false;
-  }
+  }
+  else
+    return false;
 }
 
@@ -888,19 +816,16 @@
  * @param fileName The file to touch
 */
-bool ResourceManager::touchFile(const char* fileName)
-{
-  char* tmpName = ResourceManager::homeDirCheck(fileName);
-  if (tmpName == NULL)
+bool ResourceManager::touchFile(const std::string& fileName)
+{
+  std::string tmpName = ResourceManager::homeDirCheck(fileName);
+  if (tmpName.empty())
     return false;
   FILE* stream;
-  if( (stream = fopen (tmpName, "w")) == NULL)
-  {
-    PRINTF(1)("could not open %s fro writing\n", fileName);
-    delete[] tmpName;
+  if( (stream = fopen (tmpName.c_str(), "w")) == NULL)
+  {
+    PRINTF(1)("could not open %s fro writing\n", fileName.c_str());
     return false;
   }
   fclose(stream);
-
-  delete[] tmpName;
 }
 
@@ -909,11 +834,8 @@
  * @param fileName the File to delete
 */
-bool ResourceManager::deleteFile(const char* fileName)
-{
-  if (fileName == NULL)
-    return false;
-  char* tmpName = ResourceManager::homeDirCheck(fileName);
-  unlink(tmpName);
-  delete[] tmpName;
+bool ResourceManager::deleteFile(const std::string& fileName)
+{
+  std::string tmpName = ResourceManager::homeDirCheck(fileName);
+  unlink(tmpName.c_str());
 }
 
@@ -921,51 +843,37 @@
  * @param name the Name of the file to check
  * @returns The name of the file, including the HomeDir
- * IMPORTANT: this has to be deleted from the outside
- */
-char* ResourceManager::homeDirCheck(const char* name)
-{
-  if (name == NULL)
-    return NULL;
-  char* retName;
-  if (!strncmp(name, "~/", 2))
-  {
-    char tmpFileName[500];
+ */
+std::string ResourceManager::homeDirCheck(const std::string& name)
+{
+  if (name.size() >= 2 && name[0] == '~' && name[1] == '/')
+  {
+    std::string homeDir;
+    std::string newName = name.substr(1);
 #ifdef __WIN32__
-    strcpy(tmpFileName, getenv("USERPROFILE"));
+    homeDir = getenv("USERPROFILE");
 #else
-    strcpy(tmpFileName, getenv("HOME"));
-#endif
-    retName = new char[strlen(tmpFileName)+strlen(name)];
-    sprintf(retName, "%s%s", tmpFileName, name+1);
-  }
-  else
-  {
-    retName = new char[strlen(name)+1];
-    strcpy(retName, name);
-  }
-  return retName;
+    homeDir = getenv("HOME");
+#endif
+    return homeDir + newName;
+  }
+  else
+    return name;
 }
 
 /**
  * @param name the relative name of the File/Directory.
- * @returns a new char* with the name in abs-dir-format
- */
-char* ResourceManager::getAbsDir(const char* name)
-{
-  if (name == NULL)
-    return NULL;
-  char* retName;
-  if (strncmp(name, "/", 1))
-  {
-    if (*name == '.' && *(name+1) != '.')
-      name++;
-    const char* absDir = ResourceManager::cwd();
-    retName = new char[strlen(absDir)+strlen(name)+1];
-    sprintf(retName, "%s%s", absDir, name);
-  }
-  else
-  {
-    retName = new char[strlen(name)+1];
-    strcpy(retName, name);
+ * @returns a new std::string with the name in abs-dir-format
+ */
+std::string ResourceManager::getAbsDir(const std::string& name)
+{
+  if (name.empty())
+    return "";
+  std::string retName = name;
+  if (strncmp(name.c_str(), "/", 1))
+  {
+    if (name[0] == '.' && name[1] != '.')
+      retName.erase(0);
+    const std::string& absDir = ResourceManager::cwd();
+    retName = absDir + retName;
   }
   return retName;
@@ -978,19 +886,14 @@
  * !!IMPORTANT: this has to be deleted from the outside!!
 */
-char* ResourceManager::getFullName(const char* fileName)
-{
-  if (fileName == NULL || ResourceManager::getInstance()->getDataDir() == NULL)
-    return NULL;
-
-  char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir())
-                           + strlen(fileName) + 1];
-  sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName);
+std::string ResourceManager::getFullName(const std::string& fileName)
+{
+  if (fileName.empty() || ResourceManager::getInstance()->getDataDir().empty())
+    return "";
+
+  std::string retName = ResourceManager::getInstance()->getDataDir() +fileName;
   if (ResourceManager::isFile(retName) || ResourceManager::isDir(retName))
     return retName;
   else
-  {
-    delete[] retName;
-    return NULL;
-  }
+    return "";
 }
 
@@ -1005,15 +908,14 @@
  * @returns the Current Woring Directory
  */
-const char* ResourceManager::cwd()
-{
-  if (ResourceManager::getInstance()->_cwd == NULL)
+const std::string& ResourceManager::cwd()
+{
+  if (ResourceManager::getInstance()->_cwd.empty())
   {
     char cwd[1024];
     char* errorCode = getcwd(cwd, 1024);
     if (errorCode == 0)
-      return NULL;
-
-    ResourceManager::getInstance()->_cwd = new char[strlen(cwd)+1];
-    strcpy(ResourceManager::getInstance()->_cwd, cwd);
+      return ResourceManager::getInstance()->_cwd;
+
+    ResourceManager::getInstance()->_cwd = cwd;
   }
   return ResourceManager::getInstance()->_cwd;
@@ -1026,13 +928,11 @@
  * @returns true if the file exists, false otherwise
  */
-bool ResourceManager::isInDataDir(const char* fileName)
-{
-  if (fileName == NULL || ResourceManager::getInstance()->getDataDir() == NULL)
+bool ResourceManager::isInDataDir(const std::string& fileName)
+{
+  if (fileName.empty() || ResourceManager::getInstance()->getDataDir().empty())
     return false;
 
   bool retVal = false;
-  char* checkFile = new char[strlen(ResourceManager::getInstance()->getDataDir())
-                             + strlen(fileName) + 1];
-  sprintf(checkFile, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName);
+  std::string checkFile = ResourceManager::getInstance()->getDataDir() + fileName;
 
   if (ResourceManager::isFile(checkFile) || ResourceManager::isDir(checkFile))
@@ -1040,5 +940,4 @@
   else
     retVal = false;
-  delete[] checkFile;
   return retVal;
 }
@@ -1055,9 +954,9 @@
   // if it is not initialized
   PRINT(0)(" Reference is: %p\n", ResourceManager::singletonRef);
-  PRINT(0)(" Data-Directory is: %s\n", this->dataDir);
+  PRINT(0)(" Data-Directory is: %s\n", this->dataDir.c_str());
   PRINT(0)(" List of Image-Directories: ");
-  std::vector<char*>::const_iterator imageDir;
+  std::vector<std::string>::const_iterator imageDir;
   for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
-    PRINT(0)("%s ", (*imageDir));
+    PRINT(0)("%s ", (*imageDir).c_str());
   PRINT(0)("\n");
 
@@ -1068,5 +967,5 @@
   {
     PRINT(0)("-----------------------------------------\n");
-    PRINT(0)("Name: %s; References: %d; Type: %s ", (*resource)->name, (*resource)->count, ResourceManager::ResourceTypeToChar((*resource)->type));
+    PRINT(0)("Name: %s; References: %d; Type: %s ", (*resource)->name.c_str(), (*resource)->count, ResourceManager::ResourceTypeToChar((*resource)->type));
 
     PRINT(0)("gets deleted at ");
Index: trunk/src/lib/util/loading/resource_manager.h
===================================================================
--- trunk/src/lib/util/loading/resource_manager.h	(revision 7201)
+++ trunk/src/lib/util/loading/resource_manager.h	(revision 7221)
@@ -71,5 +71,5 @@
   unsigned int      count;             //!< How many times this Resource has been loaded.
 
-  char*             name;              //!< Name of the Resource.
+  std::string       name;              //!< Name of the Resource.
   ResourceType      type;              //!< ResourceType of this Resource.
   ResourcePriority  prio;              //!< The Priority of this resource. (This will only be increased)
@@ -96,20 +96,20 @@
   inline static ResourceManager* getInstance() { if (!singletonRef) singletonRef = new ResourceManager();  return singletonRef; };
 
-  bool setDataDir(const char* dataDir);
+  bool setDataDir(const std::string& dataDir);
   /** @returns the Name of the data directory */
-  inline const char* getDataDir() const { return this->dataDir; };
+  inline const std::string& getDataDir() const { return this->dataDir; };
 
 
-  bool tryDataDir(const char* dataDir);
-  bool verifyDataDir(const char* fileInside);
-  bool addImageDir(const char* imageDir);
+  bool tryDataDir(const std::string& dataDir);
+  bool verifyDataDir(const std::string& fileInside);
+  bool addImageDir(const std::string& imageDir);
 
-  bool cache(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO,
+  bool cache(const std::string& fileName, ResourceType type, ResourcePriority prio = RP_NO,
              const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType());
   BaseObject* copy(BaseObject* resourcePointer);
 
-  BaseObject* load(const char* fileName, ResourcePriority prio = RP_NO,
+  BaseObject* load(const std::string& fileName, ResourcePriority prio = RP_NO,
                    const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType());
-  BaseObject* load(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO,
+  BaseObject* load(const std::string& fileName, ResourceType type, ResourcePriority prio = RP_NO,
                    const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType());
   bool unload(BaseObject* pointer, ResourcePriority prio = RP_NO);
@@ -117,10 +117,10 @@
   bool unloadAllByPriority(ResourcePriority prio);
 
-  Resource* locateResourceByInfo(const char* fileName, ResourceType type,
+  Resource* locateResourceByInfo(const std::string& fileName, ResourceType type,
                                  const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType()) const;
   Resource* locateResourceByPointer(const void* pointer) const;
 
-  char* toResourcableString(unsigned int i);
-  bool fromResourceableString(const char* resourceableString);
+  std::string toResourcableString(unsigned int i);
+  bool fromResourceableString(const std::string& resourceableString);
   /** @returns the Count of Resources the ResourceManager handles */
   unsigned int resourceCount() const { return this->resourceList.size(); }
@@ -130,13 +130,13 @@
 
   // utility functions for handling files in and around the data-directory
-  static bool isDir(const char* directory);
-  static bool isFile(const char* fileName);
-  static bool touchFile(const char* fileName);
-  static bool deleteFile(const char* fileName);
-  static char* homeDirCheck(const char* fileName);
-  static char* getFullName(const char* fileName);
-  static bool isInDataDir(const char* fileName);
-  static char* getAbsDir(const char* fileName);
-  static const char* cwd();
+  static bool isDir(const std::string& directory);
+  static bool isFile(const std::string& fileName);
+  static bool touchFile(const std::string& fileName);
+  static bool deleteFile(const std::string& fileName);
+  static std::string homeDirCheck(const std::string& fileName);
+  static std::string getFullName(const std::string& fileName);
+  static bool isInDataDir(const std::string& fileName);
+  static std::string getAbsDir(const std::string& fileName);
+  static const std::string& cwd();
 
   static const char* ResourceTypeToChar(ResourceType type);
@@ -145,17 +145,17 @@
  private:
   ResourceManager();
-  Resource* loadResource(const char* fileName, ResourceType type, ResourcePriority prio,
+  Resource* loadResource(const std::string& fileName, ResourceType type, ResourcePriority prio,
                          const MultiType& param0, const MultiType& param1, const MultiType& param2);
 
  private:
-  static ResourceManager*  singletonRef;       //!< singleton Reference
+  static ResourceManager*    singletonRef;       //!< singleton Reference
 
-  char*                    _cwd;               //!< The currend Working directory.
-  char*                    dataDir;            //!< The Data Directory, where all relevant Data is stored.
-  std::vector<char*>       imageDirs;          //!< A list of directories in which images are stored.
+  std::string                _cwd;               //!< The currend Working directory.
+  std::string                dataDir;            //!< The Data Directory, where all relevant Data is stored.
+  std::vector<std::string>   imageDirs;          //!< A list of directories in which images are stored.
 
-  std::vector<Resource*>   resourceList;       //!< The List of Resources, that has already been loaded.
+  std::vector<Resource*>     resourceList;       //!< The List of Resources, that has already been loaded.
 
-  static const char*       resourceNames[RESOURCE_TYPE_SIZE];
+  static const char*         resourceNames[RESOURCE_TYPE_SIZE];
 };
 
