mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-28 05:50:34 +05:00
21948: EDF SMESH : Memory is not freed when deleting a mesh
+ typedef SALOME::GenericObj_wrap< GEOM_Object > GEOM_Object_wrap; + // + // wrappers of operations + typedef SALOME::GenericObj_wrap< GEOM_IBasicOperations > GEOM_IBasicOperations_wrap; + typedef SALOME::GenericObj_wrap< GEOM_ITransformOperations> GEOM_ITransformOperations_wrap; + ...
This commit is contained in:
parent
8357ffed81
commit
3bec9e87eb
@ -30,6 +30,8 @@
|
||||
#include "SALOMEconfig.h"
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
|
||||
#include <SALOME_GenericObj_wrap.hxx>
|
||||
|
||||
namespace GEOM
|
||||
{
|
||||
/*!
|
||||
@ -87,15 +89,15 @@ namespace GEOM
|
||||
void Register()
|
||||
{
|
||||
if ( !CORBA::is_nil( this->myObject ) )
|
||||
this->myObject->Register();
|
||||
this->myObject->Register();
|
||||
}
|
||||
|
||||
//! Decrement counter for the object.
|
||||
void UnRegister()
|
||||
{
|
||||
if ( !CORBA::is_nil( this->myObject ) ) {
|
||||
this->myObject->UnRegister();
|
||||
this->myObject = TInterface::_nil();
|
||||
this->myObject->UnRegister();
|
||||
this->myObject = TInterface::_nil();
|
||||
}
|
||||
}
|
||||
|
||||
@ -231,6 +233,31 @@ namespace GEOM
|
||||
typedef GenericObjPtr<GEOM::GEOM_IAdvancedOperations> AdvancedOpPtr;
|
||||
|
||||
template<> bool GEOMBASE_EXPORT GenericObjPtr<GEOM::GEOM_Object>::isSame( GEOM::GEOM_Object_ptr theLeft, GEOM::GEOM_Object_ptr theRight );
|
||||
|
||||
|
||||
// Declare a type to replace GEOM::GEOM_Object_var by GEOM::GEOM_Object_wrap,
|
||||
// to be used in the case if a new GEOM_Object is received, in which case
|
||||
// obj->UnRegister() must be called to avoid a memory leak.
|
||||
// The GEOM::GEOM_Object_wrap object calls UnRegister() at destruction.
|
||||
// A simple rule: use GEOM::GEOM_Object_wrap if an object is returned by a
|
||||
// GEOM operation (GEOM::GEOM_IBasicOperations etc).
|
||||
//
|
||||
typedef SALOME::GenericObj_wrap< GEOM_Object > GEOM_Object_wrap;
|
||||
//
|
||||
// wrappers of operations
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IBasicOperations > GEOM_IBasicOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_ITransformOperations> GEOM_ITransformOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_I3DPrimOperations > GEOM_I3DPrimOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IShapesOperations > GEOM_IShapesOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IBlocksOperations > GEOM_IBlocksOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IBooleanOperations > GEOM_IBooleanOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_ICurvesOperations > GEOM_ICurvesOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_ILocalOperations > GEOM_ILocalOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IHealingOperations > GEOM_IHealingOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IInsertOperations > GEOM_IInsertOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IMeasureOperations > GEOM_IMeasureOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IGroupOperations > GEOM_IGroupOperations_wrap;
|
||||
typedef SALOME::GenericObj_wrap< GEOM_IAdvancedOperations > GEOM_IAdvancedOperations_wrap;
|
||||
}
|
||||
|
||||
#endif // GEOM_GenericObjPtr_H
|
||||
|
Loading…
Reference in New Issue
Block a user