소스 검색

Modify memory cleanup to use Owned object.

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Gleb Aronsky 13 년 전
부모
커밋
645f357786
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      esp/services/WsDeploy/WsDeployService.hpp

+ 3 - 5
esp/services/WsDeploy/WsDeployService.hpp

@@ -244,13 +244,11 @@ private:
 
         while ( m_quitThread == false )
         {
-          IDirectoryDifferenceIterator* diffIter = configFiles->monitorDirectory(NULL, NULL, false, false, m_uCheckInterval, m_uTimeout);
+          Owned<IDirectoryDifferenceIterator> diffIter = configFiles->monitorDirectory(NULL, NULL, false, false, m_uCheckInterval, m_uTimeout);
 
-          if (diffIter != NULL)
+          if (diffIter.get() != NULL)
           {
-            notify(diffIter);
-
-            delete diffIter;
+            notify(diffIter.get());
           }
         }
       };