[MOAB-dev] commit/MOAB: danwu: Delete MOAB instance at the end of main() for some examples.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Sep 23 13:15:08 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/e45ac523ace4/
Changeset:   e45ac523ace4
Branch:      master
User:        danwu
Date:        2013-09-23 20:14:55
Summary:     Delete MOAB instance at the end of main() for some examples.

Affected #:  6 files

diff --git a/examples/GetEntities.cpp b/examples/GetEntities.cpp
index 6c6a956..d9dc34e 100644
--- a/examples/GetEntities.cpp
+++ b/examples/GetEntities.cpp
@@ -55,6 +55,8 @@ int main(int argc, char **argv) {
       cout << endl;
     }
   }
-  
+
+  delete mb;
+
   return 0;
 }

diff --git a/examples/HelloParMOAB.cpp b/examples/HelloParMOAB.cpp
index 75daeda..03366f9 100644
--- a/examples/HelloParMOAB.cpp
+++ b/examples/HelloParMOAB.cpp
@@ -97,6 +97,8 @@ int main(int argc, char **argv)
     }
   }
 
+  delete mb;
+
   MPI_Finalize();
 
   return 0;

diff --git a/examples/old/FileRead.cpp b/examples/old/FileRead.cpp
index bff9e28..b1abda0 100644
--- a/examples/old/FileRead.cpp
+++ b/examples/old/FileRead.cpp
@@ -160,5 +160,8 @@ int main(int argc, char **argv) {
      cout << "Writing output file " << outfile << endl;
      mb->write_file(outfile); 
    }
+
+   delete mb;
+
    return 0;
 }  

diff --git a/examples/old/GeomSetHierarchy.cpp b/examples/old/GeomSetHierarchy.cpp
index a49dafe..493baa7 100644
--- a/examples/old/GeomSetHierarchy.cpp
+++ b/examples/old/GeomSetHierarchy.cpp
@@ -79,5 +79,9 @@ int main(int argc, char **argv) {
         }
       }
     }
-  } 
+  }
+
+  delete mb;
+
+  return 0;
 }

diff --git a/examples/old/ObbTree.cpp b/examples/old/ObbTree.cpp
index 220681f..f83b440 100644
--- a/examples/old/ObbTree.cpp
+++ b/examples/old/ObbTree.cpp
@@ -76,5 +76,7 @@ int main(int argc, char **argv) {
   }
   std::cout << " of ray length " << ray_length << std::endl;
 
+  delete mb;
+
   return 0;
 }

diff --git a/examples/old/simple/GetEntities.cpp b/examples/old/simple/GetEntities.cpp
index 1ac5783..8d235fd 100644
--- a/examples/old/simple/GetEntities.cpp
+++ b/examples/old/simple/GetEntities.cpp
@@ -27,5 +27,8 @@ int main(int argc, char **argv) {
                 << mb->id_from_handle(ent) << "." << std::endl;
     }
   }
+
+  delete mb;
+
   return 0;
 }

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list