[omniORB] Corba::String_member
Johnny Willemsen
jwillemsen at remedy.nl
Thu Nov 6 07:51:46 GMT 2014
Hi,
The CORBA C++ mapping is special and has a mix of manual/automatic
reference counting. Would recommend you to get the CORBA Programming
with C++ book and follow the mapping in detail, any mistake could lead
to a memory leak or crash, we always test with valgrind to try to detect
errors as early as possible.
The new IDL to C++11 language mapping maps a IDL string to std::string,
but that is not supported yet by omniORB, see
https://osportal.remedy.nl/projects/idl2cppx0 for more details about
this new mapping and available implementations.
Best regards,
Johnny Willemsen
Remedy IT
On 11/06/2014 12:03 AM, Immanuel Litzroth wrote:
> I'm looking at this code in stringtypes.h
>
>>inline _CORBA_String_member& operator=(char* s) {
>> _CORBA_String_helper::dealloc(_ptr);
>> _ptr = s;
>> return *this;
>> }
>
> I'm a bit confused why it deallocates _ptr. I have a struct which is
> initialized with String_members.
> I've got a const char* I want to put into them. My only route seems to
> be to create another String_member or String_var and then one of these
> assignment operators?
> inline _CORBA_String_member& operator=(const _CORBA_String_member& s)
> Or am I missing the correct idiom here?
> Regards,
>
> *Immanuel Litzroth, principal software engineer*
> CloudFounders
> Tel: +32 9 355 34 16
> Support: +32 9 324 25 66
>
> CloudFounders, Innovators in Cloud Technologies
> <http://www.cloudfounders.com/>
> www.cloudfounders.com
> <http://www.cloudfounders.com/> | www.cloudframesvrun.com
> <http://www.cloudframesvrun.com/>
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
More information about the omniORB-list
mailing list