<div dir="ltr">Hi,<div>Solved my problem which was due to not initializing a XXX_var, which</div><div>then of course crashed in the assignment operator of the String_members.</div><div>Was late yesterday :-)</div><div>Thanks for all your replies,</div><div>Immanuel</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><b style="font-size:12px;font-family:Arial,Helvetica,sans-serif">Immanuel Litzroth, principal software engineer</b><br style="font-size:12px;font-family:Arial,Helvetica,sans-serif"><span style="font-size:12px;font-family:Arial,Helvetica,sans-serif">CloudFounders</span><br style="font-size:12px;font-family:Arial,Helvetica,sans-serif"><div>Tel: +32 9 355 34 16</div><div>Support: +32 9 324 25 66</div><div><br></div><a href="http://www.cloudfounders.com/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:10px" target="_blank"><img src="http://cloudframesvrun.com/Images/logo_cloudfounders.png" alt="CloudFounders, Innovators in Cloud Technologies" width="240"></a><br style="font-size:12px;font-family:Arial,Helvetica,sans-serif"><a href="http://www.cloudfounders.com/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:10px" target="_blank">www.cloudfounders.com</a><span style="font-size:12px;font-family:Arial,Helvetica,sans-serif"> | </span><a href="http://www.cloudframesvrun.com/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:10px" target="_blank">www.cloudframesvrun.com</a><br></div><div><br></div></div></div></div>
<br><div class="gmail_quote">On 6 November 2014 08:51, Johnny Willemsen <span dir="ltr"><<a href="mailto:jwillemsen@remedy.nl" target="_blank">jwillemsen@remedy.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
The CORBA C++ mapping is special and has a mix of manual/automatic<br>
reference counting. Would recommend you to get the CORBA Programming<br>
with C++ book and follow the mapping in detail, any mistake could lead<br>
to a memory leak or crash, we always test with valgrind to try to detect<br>
errors as early as possible.<br>
<br>
The new IDL to C++11 language mapping maps a IDL string to std::string,<br>
but that is not supported yet by omniORB, see<br>
<a href="https://osportal.remedy.nl/projects/idl2cppx0" target="_blank">https://osportal.remedy.nl/projects/idl2cppx0</a> for more details about<br>
this new mapping and available implementations.<br>
<br>
Best regards,<br>
<br>
Johnny Willemsen<br>
Remedy IT<br>
<span class="im HOEnZb"><br>
On 11/06/2014 12:03 AM, Immanuel Litzroth wrote:<br>
> I'm looking at this code in stringtypes.h<br>
><br>
>>inline _CORBA_String_member& operator=(char* s) {<br>
>> _CORBA_String_helper::dealloc(_ptr);<br>
>> _ptr = s;<br>
>> return *this;<br>
>> }<br>
><br>
> I'm a bit confused why it deallocates _ptr. I have a struct which is<br>
> initialized with String_members.<br>
> I've got a const char* I want to put into them. My only route seems to<br>
> be to create another String_member or String_var and then one of these<br>
> assignment operators?<br>
> inline _CORBA_String_member& operator=(const _CORBA_String_member& s)<br>
> Or am I missing the correct idiom here?<br>
> Regards,<br>
><br>
</span><span class="im HOEnZb">> *Immanuel Litzroth, principal software engineer*<br>
</span><span class="im HOEnZb">> CloudFounders<br>
> Tel: <a href="tel:%2B32%209%20355%2034%2016" value="+3293553416">+32 9 355 34 16</a><br>
> Support: <a href="tel:%2B32%209%20324%2025%2066" value="+3293242566">+32 9 324 25 66</a><br>
><br>
</span><span class="im HOEnZb">> CloudFounders, Innovators in Cloud Technologies<br>
</span><div class="HOEnZb"><div class="h5">> <<a href="http://www.cloudfounders.com/" target="_blank">http://www.cloudfounders.com/</a>><br>
> <a href="http://www.cloudfounders.com" target="_blank">www.cloudfounders.com</a><br>
> <<a href="http://www.cloudfounders.com/" target="_blank">http://www.cloudfounders.com/</a>> | <a href="http://www.cloudframesvrun.com" target="_blank">www.cloudframesvrun.com</a><br>
> <<a href="http://www.cloudframesvrun.com/" target="_blank">http://www.cloudframesvrun.com/</a>><br>
><br>
><br>
><br>
> _______________________________________________<br>
> omniORB-list mailing list<br>
> <a href="mailto:omniORB-list@omniorb-support.com">omniORB-list@omniorb-support.com</a><br>
> <a href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list" target="_blank">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</a><br>
><br>
<br>
</div></div></blockquote></div><br></div>