Salome HOME
Free memory on deletion of handle object
[modules/shaper.git] / src / GeomAPI / GeomAPI_Interface.cpp
index 5e9b257fbb17a6436d864d3ce921126caf2b59e5..4db15c99606069265f46b225eb93d2b55b993199 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAPI_Interface.cpp
 // Created:     23 Apr 2014
 // Author:      Mikhail PONIKAROV
@@ -16,16 +18,13 @@ GeomAPI_Interface::GeomAPI_Interface(void* theImpl)
 
 GeomAPI_Interface::~GeomAPI_Interface()
 {
-  if (myImpl)
+  if (myImpl) {
     delete myImpl;
+    myImpl = 0;
+  }
 }
 
-void* GeomAPI_Interface::implementation()
-{
-  return myImpl;
-}
-
-void GeomAPI_Interface::setImplementation(void* theImpl)
+void GeomAPI_Interface::setImpl(void* theImpl)
 {
   if (myImpl)
     delete myImpl;