[cgma-dev] r2298 - cgm/trunk/geom
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue Dec 2 18:21:55 CST 2008
Author: tautges
Date: 2008-12-02 18:21:53 -0600 (Tue, 02 Dec 2008)
New Revision: 2298
Modified:
cgm/trunk/geom/CGMApp.cpp
cgm/trunk/geom/CGMApp.hpp
Log:
Fixing CGMApp::delete_instance to set instance to NULL after
deleting it, also removing assignment of member variable after
delete_instance is called from shutdown, since then there won't be any member
variables.
Avoids shutdown-time segfault in testgeom_occ.
Jane, run valgrind on testgeom_occ, there's still a memory access
error in one of the booleans, it just doesn't happen to kill the
code.
Modified: cgm/trunk/geom/CGMApp.cpp
===================================================================
--- cgm/trunk/geom/CGMApp.cpp 2008-12-02 20:14:10 UTC (rev 2297)
+++ cgm/trunk/geom/CGMApp.cpp 2008-12-03 00:21:53 UTC (rev 2298)
@@ -96,7 +96,10 @@
delete GeometryModifyTool::instance();
delete GeometryQueryTool::instance();
-mAppStarted = CUBIT_FALSE;
+ CGMApp::delete_instance();
+
+ AppUtil::instance()->shutdown();
+ AppUtil::delete_instance();
}
void CGMApp::initialize_settings()
Modified: cgm/trunk/geom/CGMApp.hpp
===================================================================
--- cgm/trunk/geom/CGMApp.hpp 2008-12-02 20:14:10 UTC (rev 2297)
+++ cgm/trunk/geom/CGMApp.hpp 2008-12-03 00:21:53 UTC (rev 2298)
@@ -47,7 +47,7 @@
static CGMApp* instance();
//- Access to the application object
- static void delete_instance() {if (instance_) delete instance_;};
+ static void delete_instance() {if (instance_) {delete instance_; instance_ = NULL;}};
~CGMApp();
More information about the cgma-dev
mailing list