[omniORB] Corba::String_member

Immanuel Litzroth immanuel.litzroth at cloudfounders.com
Thu Nov 6 08:07:25 GMT 2014


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

[image: CloudFounders, Innovators in Cloud Technologies]
<http://www.cloudfounders.com/>
www.cloudfounders.com | www.cloudframesvrun.com


On 6 November 2014 08:51, Johnny Willemsen <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
> > 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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20141106/faa58532/attachment.html>


More information about the omniORB-list mailing list