TCollection_AsciiString aValue;
if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->Value();
else aValue = SALOMEDS::AttributeName::_narrow(_corba_impl)->Value();
+
+ cout << "########################## Attribute Name = " << aValue << endl;
return aValue.ToCString();
}
}
else {
_local_impl = NULL;
- _corba_impl = theGA;
+ _corba_impl = SALOMEDS::GenericAttribute::_duplicate(theGA);
}
}
SALOMEDS_GenericAttribute::~SALOMEDS_GenericAttribute()
-{}
+{
+ if(!_isLocal) CORBA::release(_corba_impl);
+}
void SALOMEDS_GenericAttribute::CheckLocked()
{
}
else {
_local_impl = NULL;
- _corba_impl = theSObject;
+ _corba_impl = SALOMEDS::SObject::_duplicate(theSObject);
}
}
SALOMEDS_SObject::~SALOMEDS_SObject()
{
+ if(!_isLocal) CORBA::release(_corba_impl);
}
char* SALOMEDS_SObject::GetID()
}
else {
_local_impl = NULL;
- _corba_impl = theStudy;
+ _corba_impl = SALOMEDS::Study::_duplicate(theStudy);
}
init_orb();
SALOMEDS_Study::~SALOMEDS_Study()
{
+ if(!_isLocal) CORBA::release(_corba_impl);
}
char* SALOMEDS_Study::GetPersistentReference()
{
_isLocal = false;
_local_impl = NULL;
- _corba_impl = theBuilder;
+ _corba_impl = SALOMEDS::StudyBuilder::_duplicate(theBuilder);
init_orb();
}
SALOMEDS_StudyBuilder::~SALOMEDS_StudyBuilder()
{
+ if(!_isLocal) CORBA::release(_corba_impl);
}
SALOMEDSClient_SComponent* SALOMEDS_StudyBuilder::NewComponent(const char* ComponentDataType)
}
else {
_local_impl = NULL;
- _corba_impl = theManager;
+ _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
}
}
SALOMEDS_StudyManager::~SALOMEDS_StudyManager()
{
+ if(!_isLocal) CORBA::release(_corba_impl);
}
SALOMEDSClient_Study* SALOMEDS_StudyManager::NewStudy(const char* study_name)