<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">&lt;<a href="mailto:jwillemsen@remedy.nl" target="_blank">jwillemsen@remedy.nl</a>&gt;</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>
&gt; I&#39;m looking at this code in stringtypes.h<br>
&gt;<br>
&gt;&gt;inline _CORBA_String_member&amp; operator=(char* s) {<br>
&gt;&gt;   _CORBA_String_helper::dealloc(_ptr);<br>
&gt;&gt;   _ptr = s;<br>
&gt;&gt;    return *this;<br>
&gt;&gt;  }<br>
&gt;<br>
&gt; I&#39;m a bit confused why it deallocates _ptr. I have a struct which is<br>
&gt; initialized with String_members.<br>
&gt; I&#39;ve got a const char* I want to put into them. My only route seems to<br>
&gt; be to create another String_member or String_var and then one of these<br>
&gt; assignment operators?<br>
&gt;   inline _CORBA_String_member&amp; operator=(const _CORBA_String_member&amp; s)<br>
&gt; Or am I missing the correct idiom here?<br>
&gt; Regards,<br>
&gt;<br>
</span><span class="im HOEnZb">&gt; *Immanuel Litzroth, principal software engineer*<br>
</span><span class="im HOEnZb">&gt; CloudFounders<br>
&gt; Tel: <a href="tel:%2B32%209%20355%2034%2016" value="+3293553416">+32 9 355 34 16</a><br>
&gt; Support: <a href="tel:%2B32%209%20324%2025%2066" value="+3293242566">+32 9 324 25 66</a><br>
&gt;<br>
</span><span class="im HOEnZb">&gt; CloudFounders, Innovators in Cloud Technologies<br>
</span><div class="HOEnZb"><div class="h5">&gt; &lt;<a href="http://www.cloudfounders.com/" target="_blank">http://www.cloudfounders.com/</a>&gt;<br>
&gt; <a href="http://www.cloudfounders.com" target="_blank">www.cloudfounders.com</a><br>
&gt; &lt;<a href="http://www.cloudfounders.com/" target="_blank">http://www.cloudfounders.com/</a>&gt; | <a href="http://www.cloudframesvrun.com" target="_blank">www.cloudframesvrun.com</a><br>
&gt; &lt;<a href="http://www.cloudframesvrun.com/" target="_blank">http://www.cloudframesvrun.com/</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; omniORB-list mailing list<br>
&gt; <a href="mailto:omniORB-list@omniorb-support.com">omniORB-list@omniorb-support.com</a><br>
&gt; <a href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list" target="_blank">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</a><br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>