Index: /trunk/src/util/loading/resource_manager.cc
===================================================================
--- /trunk/src/util/loading/resource_manager.cc	(revision 6641)
+++ /trunk/src/util/loading/resource_manager.cc	(revision 6642)
@@ -79,6 +79,6 @@
   while (!this->imageDirs.empty())
   {
-    delete[] this->imageDirs.front();
-    this->imageDirs.pop_front();
+    delete[] this->imageDirs.back();
+    this->imageDirs.pop_back();
   }
 
@@ -203,5 +203,5 @@
   {
     // check if the Directory has been added before
-    std::list<char*>::const_iterator imageDir;
+    std::vector<char*>::const_iterator imageDir;
     for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
     {
@@ -467,5 +467,5 @@
     else
     {
-      std::list<char*>::iterator imageDir;
+      std::vector<char*>::iterator imageDir;
       for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
       {
@@ -611,5 +611,5 @@
       PRINTF(4)("Resource %s safely removed.\n", resource->name);
       delete[] resource->name;
-      std::list<Resource*>::iterator resourceIT = std::find(this->resourceList.begin(), this->resourceList.end(), resource);
+      std::vector<Resource*>::iterator resourceIT = std::find(this->resourceList.begin(), this->resourceList.end(), resource);
       this->resourceList.erase(resourceIT);
       delete resource;
@@ -630,25 +630,23 @@
 bool ResourceManager::unloadAllByPriority(ResourcePriority prio)
 {
-  std::list<Resource*>::iterator resource, pre;
-  pre = --this->resourceList.end();
   unsigned int removeCount;
   for (unsigned int round = 0; round < 3; round++)
   {
+    int index = this->resourceList.size() - 1;
     removeCount = 0;
-    while (pre != resourceList.end())
-    {
-      resource = pre;
-      pre--;
-      if ((*resource)->prio <= prio)
+    while (index >= 0)
+    {
+      if (this->resourceList[index]->prio <= prio)
       {
-        if ((*resource)->count == 0)
-          unload((*resource), prio);
+        if (this->resourceList[index]->count == 0)
+          unload(this->resourceList[index], prio);
         else
         {
           PRINTF(2)("unable to unload %s because there are still %d references to it\n",
-                    (*resource)->name, (*resource)->count);
+                    this->resourceList[index]->name, this->resourceList[index]->count);
           removeCount++;
         }
       }
+      index--;
     }
     if (removeCount == 0) break;
@@ -669,5 +667,5 @@
     void* param1, void* param2, void* param3) const
 {
-  std::list<Resource*>::const_iterator resource;
+  std::vector<Resource*>::const_iterator resource;
   for (resource = this->resourceList.begin(); resource != this->resourceList.end(); resource++)
   {
@@ -751,5 +749,5 @@
 {
   //  Resource* enumRes = resourceList->enumerate();
-  std::list<Resource*>::const_iterator resource;
+  std::vector<Resource*>::const_iterator resource;
   for (resource = this->resourceList.begin(); resource != this->resourceList.end(); resource++)
     if (pointer == (*resource)->pointer)
@@ -967,5 +965,5 @@
   PRINT(0)(" Data-Directory is: %s\n", this->dataDir);
   PRINT(0)(" List of Image-Directories: ");
-  std::list<char*>::const_iterator imageDir;
+  std::vector<char*>::const_iterator imageDir;
   for (imageDir = this->imageDirs.begin(); imageDir != this->imageDirs.end(); imageDir++)
     PRINT(0)("%s ", (*imageDir));
@@ -973,5 +971,5 @@
 
   PRINT(0)("List of all stored Resources:\n");
-  std::list<Resource*>::const_iterator resource;
+  std::vector<Resource*>::const_iterator resource;
   for (resource = this->resourceList.begin(); resource != this->resourceList.end(); resource++)
 
Index: /trunk/src/util/loading/resource_manager.h
===================================================================
--- /trunk/src/util/loading/resource_manager.h	(revision 6641)
+++ /trunk/src/util/loading/resource_manager.h	(revision 6642)
@@ -23,5 +23,5 @@
 
 
-#include <list>
+#include <vector>
 
 //! An eumerator for different fileTypes the resourceManager supports
@@ -154,7 +154,7 @@
 
   char*                    dataDir;            //!< The Data Directory, where all relevant Data is stored.
-  std::list<Resource*>     resourceList;       //!< The List of Resources, that has already been loaded.
-  std::list<char*>         imageDirs;          //!< A list of directories in which images are stored.
+  std::vector<char*>       imageDirs;          //!< A list of directories in which images are stored.
 
+  std::vector<Resource*>   resourceList;       //!< The List of Resources, that has already been loaded.
 };
 
