summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFotios Sioutis <sfotis@gmail.com>2011-12-15 20:46:52 +0200
committerDenis Barbier <bouzim@gmail.com>2011-12-17 12:51:56 +0100
commitf662947f7bd03b10baf2899f980b3fb86d6f6639 (patch)
treee2afd8bfefdb0654672367ac64cc5b8a8fcc623c
parent6bcb16819a012983b2a7b520bef7192f498ff146 (diff)
downloadoce-f662947f7bd03b10baf2899f980b3fb86d6f6639.tar.gz
oce-f662947f7bd03b10baf2899f980b3fb86d6f6639.zip
Resolved issue with local variable in singleton
bcc needs a local object (stack) to have its destructor public even when created from within scope. (bcc32 bug)
-rw-r--r--src/BRepMesh/BRepMesh_DiscretFactory.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/BRepMesh/BRepMesh_DiscretFactory.cxx b/src/BRepMesh/BRepMesh_DiscretFactory.cxx
index 69f34026..6d4ce30a 100644
--- a/src/BRepMesh/BRepMesh_DiscretFactory.cxx
+++ b/src/BRepMesh/BRepMesh_DiscretFactory.cxx
@@ -74,9 +74,14 @@ void BRepMesh_DiscretFactory::Clear()
//=======================================================================
BRepMesh_DiscretFactory& BRepMesh_DiscretFactory::Get()
{
+#ifdef __BORLANDC__
+ static BRepMesh_DiscretFactory* sFactory = new BRepMesh_DiscretFactory;
+ return *sFactory;
+#else
//! global factory instance
static BRepMesh_DiscretFactory THE_GLOBAL_FACTORY;
return THE_GLOBAL_FACTORY;
+#endif
}
//=======================================================================