Ignore:
Timestamp:
06/07/06 10:59:55 (18 years ago)
Author:
mattausch
Message:

debug run: fixing memory holes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1001 r1002  
    1010#include "MeshKdTree.h" 
    1111#include "Exporter.h" 
    12 #include "X3dExporter.h" // delete later 
    1312#include "ViewCell.h" 
    1413#include "SceneGraph.h" 
     
    4948  environment->GetStringValue("Preprocessor.type", buff); 
    5049  string preprocessorType(buff); 
    51          
    52   Preprocessor *p; 
    5350 
     51  Preprocessor *p = NULL; 
     52 
     53  
    5454  if (preprocessorType == "vss") 
    5555  { 
     
    5757  } 
    5858  else 
     59  { 
    5960        if (preprocessorType == "rss") 
    60           p = new RssPreprocessor(); 
     61        { 
     62                p = new RssPreprocessor(); 
     63        } 
    6164        else 
     65        { 
    6266          if (preprocessorType == "exact") 
     67          { 
    6368                p = new ExactPreprocessor(); 
     69          } 
    6470          else 
     71          { 
    6572                if (preprocessorType == "sampling") 
     73                { 
    6674                  p = new SamplingPreprocessor(); 
     75                } 
    6776                else 
     77                {        
    6878                  if (preprocessorType == "render") 
    6979                  { 
    70                           p = new RenderSampler(); 
     80                         p = new RenderSampler(); 
    7181                  } 
    7282                  else { 
    73                         cerr<<"Unknown preprocessor type"<<endl; 
    74                         Debug<<"Unknown preprocessor type"<<endl; 
    75                         exit(1); 
     83                          DEL_PTR(environment); 
     84                          cerr<<"Unknown preprocessor type"<<endl; 
     85                          Debug<<"Unknown preprocessor type"<<endl; 
     86                          exit(1); 
    7687                  } 
     88                } 
     89          } 
     90        } 
     91  } 
    7792   
    78   
     93 
    7994  QApplication *app = NULL; 
    8095 
     
    149164         returnCode = app->exec(); 
    150165 
    151    // clean up 
     166  //-- clean up 
    152167  DEL_PTR(p); 
    153168  DEL_PTR(environment); 
     169 
    154170  MeshManager::DelSingleton(); 
    155171  MaterialManager::DelSingleton(); 
    156172 
     173  DEL_PTR(pt); 
    157174 
    158175  return returnCode; 
Note: See TracChangeset for help on using the changeset viewer.