<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.im
        {mso-style-name:im;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#2F53A7;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:DE;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#2F53A7">... would suggest using CORBA-types for communication only doing specific conversions before / after CORBA call<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#2F53A7"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#2F53A7">Best regards,</span><span lang="EN-US" style="color:#2F53A7"><br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#2F53A7">Evgeni Rojkov<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Immanuel Litzroth [mailto:immanuel.litzroth@cloudfounders.com]
<br>
<b>Gesendet:</b> Donnerstag, 6. November 2014 09:07<br>
<b>An:</b> jwillemsen@remedy.nl<br>
<b>Cc:</b> omniORB-list@omniorb-support.com<br>
<b>Betreff:</b> Re: [omniORB] Corba::String_member<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal">Solved my problem which was due to not initializing a XXX_var, which<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">then of course crashed in the assignment operator of the String_members.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Was late yesterday :-)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for all your replies,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Immanuel<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Immanuel Litzroth, principal software engineer</span></b><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><br>
CloudFounders</span><o:p></o:p></p>
<div>
<p class="MsoNormal">Tel: &#43;32 9 355 34 16<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Support: &#43;32 9 324 25 66<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal"><a href="http://www.cloudfounders.com/" target="_blank"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1155CC;border:solid windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="240" height="240" id="_x0000_i1025" src="cid:image001.jpg@01CFF9A9.5385A350" alt="Das Bild wurde vom Absender entfernt. CloudFounders, Innovators in Cloud Technologies"></span></a><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><br>
</span><a href="http://www.cloudfounders.com/" target="_blank"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1155CC">www.cloudfounders.com</span></a><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&nbsp;|&nbsp;</span><a href="http://www.cloudframesvrun.com/" target="_blank"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1155CC">www.cloudframesvrun.com</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On 6 November 2014 08:51, Johnny Willemsen &lt;<a href="mailto:jwillemsen@remedy.nl" target="_blank">jwillemsen@remedy.nl</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
The CORBA C&#43;&#43; mapping is special and has a mix of manual/automatic<br>
reference counting. Would recommend you to get the CORBA Programming<br>
with C&#43;&#43; 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&#43;&#43;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>
<br>
<span class="im">On 11/06/2014 12:03 AM, Immanuel Litzroth wrote:</span><br>
<span class="im">&gt; I'm looking at this code in stringtypes.h</span><br>
<span class="im">&gt;</span><br>
<span class="im">&gt;&gt;inline _CORBA_String_member&amp; operator=(char* s) {</span><br>
<span class="im">&gt;&gt;&nbsp; &nbsp;_CORBA_String_helper::dealloc(_ptr);</span><br>
<span class="im">&gt;&gt;&nbsp; &nbsp;_ptr = s;</span><br>
<span class="im">&gt;&gt;&nbsp; &nbsp; return *this;</span><br>
<span class="im">&gt;&gt;&nbsp; }</span><br>
<span class="im">&gt;</span><br>
<span class="im">&gt; I'm a bit confused why it deallocates _ptr. I have a struct which is</span><br>
<span class="im">&gt; initialized with String_members.</span><br>
<span class="im">&gt; I've got a const char* I want to put into them. My only route seems to</span><br>
<span class="im">&gt; be to create another String_member or String_var and then one of these</span><br>
<span class="im">&gt; assignment operators?</span><br>
<span class="im">&gt;&nbsp; &nbsp;inline _CORBA_String_member&amp; operator=(const _CORBA_String_member&amp; s)</span><br>
<span class="im">&gt; Or am I missing the correct idiom here?</span><br>
<span class="im">&gt; Regards,</span><br>
<span class="im">&gt;</span><br>
<span class="im">&gt; *Immanuel Litzroth, principal software engineer*</span><br>
<span class="im">&gt; CloudFounders</span><br>
<span class="im">&gt; Tel: <a href="tel:%2B32%209%20355%2034%2016">&#43;32 9 355 34 16</a></span><br>
<span class="im">&gt; Support: <a href="tel:%2B32%209%20324%2025%2066">&#43;32 9 324 25 66</a></span><br>
<span class="im">&gt;</span><br>
<span class="im">&gt; CloudFounders, Innovators in Cloud Technologies</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&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;<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>