Index: code/branches/cpp11_v3/src/orxonox/controllers/SectionController.cc
===================================================================
--- code/branches/cpp11_v3/src/orxonox/controllers/SectionController.cc	(revision 11066)
+++ code/branches/cpp11_v3/src/orxonox/controllers/SectionController.cc	(revision 11067)
@@ -174,26 +174,17 @@
         this->setFormationMode( this->myDivisionLeader_->getFormationMode() );
         this->spread_ = this->myDivisionLeader_->getSpread();
-        Vector3* targetRelativePosition;
         switch (this->formationMode_){
             case FormationMode::WALL:
-            {
-                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 0);   
-                break;
-            }
+                return Vector3 (-2.0f*this->spread_, 0, 0);
+
             case FormationMode::FINGER4: 
-            {
-                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);   
-                break;
-            }
+                return Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);
             
             case FormationMode::DIAMOND: 
-            {
-                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);
-                break;
-            }
-        }
-        Vector3 result = *targetRelativePosition;
-        delete targetRelativePosition;
-        return result;
+                return Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);
+
+            default:
+                return Vector3::ZERO;
+        }
     }
 
Index: code/branches/cpp11_v3/src/orxonox/controllers/WingmanController.cc
===================================================================
--- code/branches/cpp11_v3/src/orxonox/controllers/WingmanController.cc	(revision 11066)
+++ code/branches/cpp11_v3/src/orxonox/controllers/WingmanController.cc	(revision 11067)
@@ -107,8 +107,5 @@
     Vector3 WingmanController::getFormationPosition ()
     {
-
-
         this->setFormationMode( this->myLeader_->getFormationMode() );
-        Vector3* targetRelativePosition;
         this->spread_ = this->myLeader_->getSpread();
         if (this->myLeader_->getIdentifier()->getName() == "DivisionController")
@@ -116,18 +113,11 @@
             switch (this->formationMode_){
                 case FormationMode::WALL:
-                {
-                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
                 case FormationMode::FINGER4: 
-                {
-                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
                 case FormationMode::DIAMOND: 
-                {
-                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
+                default:
+                    return Vector3::ZERO;
             }
         }
@@ -136,23 +126,13 @@
             switch (this->formationMode_){
                 case FormationMode::WALL:
-                {
-                    targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (-2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
                 case FormationMode::FINGER4: 
-                {
-                    targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (-2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
                 case FormationMode::DIAMOND: 
-                {
-                    targetRelativePosition = new Vector3 (2.0f*this->spread_, -1.0f*this->spread_, 0 - 1.0f*this->tolerance_);
-                    break;
-                }
+                    return Vector3 (2.0f*this->spread_, -1.0f*this->spread_, 0 - 1.0f*this->tolerance_);
+                default:
+                    return Vector3::ZERO;
             }
         }
-        Vector3 result = *targetRelativePosition;
-        delete targetRelativePosition;
-        return result;
     }
     void WingmanController::keepFormation()
