]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix memory leak with shared_ptr in HighModelAPI and ConstructionAPI
authorspo <sergey.pokhodenko@opencascade.com>
Wed, 25 May 2016 07:47:08 +0000 (10:47 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Wed, 25 May 2016 07:47:08 +0000 (10:47 +0300)
src/ConstructionAPI/ConstructionAPI.i
src/ModelHighAPI/ModelHighAPI.i
src/ModelHighAPI/ModelHighAPI_swig.h

index 5d9a79484fd8534bb5c1f6695b0b14cc968686a3..ed3c2172a428d599943846a1f92d20598d706928 100644 (file)
 
 // standard definitions
 %include "typemaps.i"
+%include "std_shared_ptr.i"
+
+// shared pointers
+%shared_ptr(ConstructionAPI_Point)
 
 // all supported interfaces
 %include "ConstructionAPI_Point.h"
index 413ba1a94bc66eecf57225684bf3006edfcb21ff..5c6369cb53c9bff7b658eb887f8c726fd9cb93e8 100644 (file)
 // standard definitions
 %include "typemaps.i"
 %include "std_string.i"
+%include "std_shared_ptr.i"
 
-// all supported interfaces
-%include "ModelHighAPI_Double.h"
+// shared pointers
+%shared_ptr(ModelHighAPI_Interface)
 
 // typemaps
 %typemap(in) const ModelHighAPI_Double & (ModelHighAPI_Double temp) {
@@ -32,3 +33,7 @@
 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Double, const ModelHighAPI_Double & {
   $1 = (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input) || PyString_Check($input)) ? 1 : 0;
 }
+
+// all supported interfaces
+%include "ModelHighAPI_Double.h"
+%include "ModelHighAPI_Interface.h"
index f5a8471c9c428e8d185a669231b3d3b4f09d0e51..d4cf88b650d404aa65c804a3a95ecdb6fd1711f5 100644 (file)
@@ -11,5 +11,6 @@
 
   #include "ModelHighAPI.h"
   #include "ModelHighAPI_Double.h"
+  #include "ModelHighAPI_Interface.h"
 
 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SWIG_H_ */