]> Creatis software - gdcm.git/blobdiff - Testing/TestValidate.cxx
RefCounter
[gdcm.git] / Testing / TestValidate.cxx
index 01c300ba76dec37aceaad8c0417348a5e038ba7f..b74cb6832c6df7fc028fb47d13b592e2141e6fb1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestValidate.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/09 08:32:50 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/11/18 11:10:04 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,8 +31,10 @@ int Validate(std::string const &filename)
    gdcm::File *input =  gdcm::File::New( );
    input->SetFileName(filename);
    input->Load();
-   gdcm::Validator *v = new gdcm::Validator();
+   gdcm::Validator *v = gdcm::Validator::New();
    v->SetInput( input );
+   input->Delete();
+   v->Delete();
    return 1; // allways true (we don't want to break the test suite)
 } 
 
@@ -58,7 +60,7 @@ int TestValidate(int argc, char *argv[])
    gdcm::Global::GetDicts()->GetDefaultPubDict()->Print();   
 
    int i =0;
-   int retVal = 0;  //by default this is an error
+   int retVal = 0;  //by default : *no* error
    while( gdcmDataImages[i] != 0 )
    {
       std::string filename = GDCM_DATA_ROOT;