Index: branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1323)
+++ branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1338)
@@ -693,5 +693,4 @@
 /** \param pcListPic list of pictures to be written to file
     \param tId       temporal sub-layer ID
-    \todo            DYN_REF_FREE should be revised
  */
 #if SVC_EXTENSION
@@ -847,31 +846,15 @@
         if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPicTop->setReconMark(false);
 
           // mark it should be extended later
           pcPicTop->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPicTop->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPicBottom->setReconMark(false);
 
           // mark it should be extended later
           pcPicBottom->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPicBottom->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         pcPicTop->setOutputMark(false);
@@ -981,16 +964,8 @@
         if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPic->setReconMark(false);
 
           // mark it should be extended later
           pcPic->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPic->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         pcPic->setOutputMark(false);
@@ -1003,5 +978,4 @@
 
 /** \param pcListPic list of pictures to be written to file
-    \todo            DYN_REF_FREE should be revised
  */
 #if SVC_EXTENSION
@@ -1074,36 +1048,19 @@
         if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPicTop->setReconMark(false);
 
           // mark it should be extended later
           pcPicTop->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPicTop->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPicBottom->setReconMark(false);
 
           // mark it should be extended later
           pcPicBottom->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPicBottom->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         pcPicTop->setOutputMark(false);
         pcPicBottom->setOutputMark(false);
 
-#if !DYN_REF_FREE
         if(pcPicTop)
         {
@@ -1112,5 +1069,4 @@
           pcPicTop = NULL;
         }
-#endif
       }
     }
@@ -1211,22 +1167,13 @@
         if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
         {
-#if !DYN_REF_FREE
           pcPic->setReconMark(false);
 
           // mark it should be extended later
           pcPic->getPicYuvRec()->setBorderExtension( false );
-
-#else
-          pcPic->destroy();
-          pcListPic->erase( iterPic );
-          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
-          continue;
-#endif
         }
         pcPic->setOutputMark(false);
       }
 #if !SVC_EXTENSION
-#if !DYN_REF_FREE
-      if(pcPic)
+      if(pcPic != NULL)
       {
         pcPic->destroy();
@@ -1234,5 +1181,4 @@
         pcPic = NULL;
       }
-#endif
 #endif
       iterPic++;
