[cgma-dev] r2301 - cgm/trunk/geom/OCC

janehu at mcs.anl.gov janehu at mcs.anl.gov
Wed Dec 3 11:19:10 CST 2008


Author: janehu
Date: 2008-12-03 11:19:10 -0600 (Wed, 03 Dec 2008)
New Revision: 2301

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
   cgm/trunk/geom/OCC/OCCQueryEngine.cpp
   cgm/trunk/geom/OCC/OCCQueryEngine.hpp
Log:
Fixed the memory leak problem on CGM-OCC part.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-12-03 05:45:07 UTC (rev 2300)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-12-03 17:19:10 UTC (rev 2301)
@@ -4312,6 +4312,7 @@
       result_body_list.append(bodysm);
     continue;
   }
+  delete acurve;
   return CUBIT_SUCCESS;
 }
 

Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp	2008-12-03 05:45:07 UTC (rev 2300)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp	2008-12-03 17:19:10 UTC (rev 2301)
@@ -172,10 +172,11 @@
   instance_ = NULL;
   delete OCCMap;
   delete OccToCGM;
-  while( BodyList->size() ) delete BodyList->pop();
+  delete BodyList;
   delete WireList;
   delete SurfaceList;
   delete CurveList;
+  delete MyDF;
 }
 
 int OCCQueryEngine::get_major_version()

Modified: cgm/trunk/geom/OCC/OCCQueryEngine.hpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.hpp	2008-12-03 05:45:07 UTC (rev 2300)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.hpp	2008-12-03 17:19:10 UTC (rev 2301)
@@ -365,7 +365,7 @@
   DLIList<OCCSurface*> *SurfaceList ;
   DLIList<OCCLoop*> *WireList; //standalone wire list
   DLIList<OCCCurve*> *CurveList ;
-  Handle(TDocStd_Document) MyDF;
+  TDocStd_Document* MyDF;
   TDF_Label mainLabel;
   TopTools_DataMapOfShapeInteger* OCCMap;
   std::map<int, TopologyBridge*>* OccToCGM;




More information about the cgma-dev mailing list