[omniORB] Corba::String_member

evgeni.rojkov at durr.com evgeni.rojkov at durr.com
Thu Nov 6 09:06:27 GMT 2014


... would suggest using CORBA-types for communication only doing specific conversions before / after CORBA call

Best regards,
Evgeni Rojkov

Von: Immanuel Litzroth [mailto:immanuel.litzroth at cloudfounders.com]
Gesendet: Donnerstag, 6. November 2014 09:07
An: jwillemsen at remedy.nl
Cc: omniORB-list at omniorb-support.com
Betreff: Re: [omniORB] Corba::String_member

Hi,
Solved my problem which was due to not initializing a XXX_var, which
then of course crashed in the assignment operator of the String_members.
Was late yesterday :-)
Thanks for all your replies,
Immanuel

Immanuel Litzroth, principal software engineer
CloudFounders
Tel: +32 9 355 34 16
Support: +32 9 324 25 66

[Das Bild wurde vom Absender entfernt. CloudFounders, Innovators in Cloud Technologies]<http://www.cloudfounders.com/>
www.cloudfounders.com<http://www.cloudfounders.com/> | www.cloudframesvrun.com<http://www.cloudframesvrun.com/>


On 6 November 2014 08:51, Johnny Willemsen <jwillemsen at remedy.nl<mailto:jwillemsen at remedy.nl>> wrote:
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<tel:%2B32%209%20355%2034%2016>
> Support: +32 9 324 25 66<tel:%2B32%209%20324%2025%2066>
>
> CloudFounders, Innovators in Cloud Technologies
> <http://www.cloudfounders.com/>
> www.cloudfounders.com<http://www.cloudfounders.com>
> <http://www.cloudfounders.com/> | www.cloudframesvrun.com<http://www.cloudframesvrun.com>
> <http://www.cloudframesvrun.com/>
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com<mailto:omniORB-list at omniorb-support.com>
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20141106/ee7f4929/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1007 bytes
Desc: image001.jpg
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20141106/ee7f4929/attachment-0001.jpg>


More information about the omniORB-list mailing list