Skip to content

Commit

Permalink
SMESH: Prevent generator from being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
ickby authored and wwmayer committed Jun 15, 2016
1 parent dcf2da7 commit 3814251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/3rdParty/salomesmesh/inc/SMESH_Gen.hxx
Expand Up @@ -60,8 +60,7 @@ typedef std::set<int> TSetOfInt;
class SMESH_EXPORT SMESH_Gen
{
public:
~SMESH_Gen();


static SMESH_Gen* get();

SMESH_Mesh* CreateMesh(int theStudyId, bool theIsEmbeddedMode)
Expand Down Expand Up @@ -161,7 +160,9 @@ public:
// std::map < int, SMESH_3D_Algo * >_map3D_Algo;

protected:
//Generator is designed to be a singleton, hence constructor and destructor are not allowed to be used
SMESH_Gen();
~SMESH_Gen();
static SMESH_Gen* generator;

private:
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/MeshPart/App/Mesher.cpp
Expand Up @@ -368,8 +368,6 @@ Mesh::MeshObject* Mesher::createMesh() const
delete mesh;
for (std::list<SMESH_Hypothesis*>::iterator it = hypoth.begin(); it != hypoth.end(); ++it)
delete *it;

delete meshgen;

MeshCore::MeshKernel kernel;
kernel.Adopt(verts, faces, true);
Expand Down

0 comments on commit 3814251

Please sign in to comment.