<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal">Hello,</p><p class="MsoNormal"> </p><p class="MsoNormal">There is a memory leak caused by the following revision:</p><pre><a href="http://sourceforge.net/p/omniorb/svn/5934/">http://sourceforge.net/p/omniorb/svn/5934/</a></pre><p class="MsoNormal"> </p><p class="MsoNormal">_default() of union should release its member.</p><p class="MsoNormal"> </p><p class="MsoNormal">test.idl:</p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">module</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> Test</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">{</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">struct</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> Money</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> m;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  };</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">union</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> nullable_money </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">switch</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">boolean</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">) { </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">case</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> TRUE: Money v; };</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">};</span></p><p class="MsoNormal"> </p><p class="MsoNormal">test.cc:</p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">#include</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#a31515;background:white">&lt;idl/Test.h&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">int</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">main</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> ()</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">{</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">Test</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">Money</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">a</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">a</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">.</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">m</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 1;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">Test</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">nullable_money</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">b</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">b</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">.</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">v</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">a</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">);</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">b</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">.</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">_default</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> (); </span><span style="font-size:9.5pt;font-family:Consolas;color:green;background:white">// memory leak</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">  </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">return</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> 0;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">}</span></p><p class="MsoNormal"> </p><p class="MsoNormal">test.h:</p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">void</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">v</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">const</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">Money</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">&amp; </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_value</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">) {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">_release_member</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__initialised</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 1;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__d</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 1;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__default</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 0;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd_v</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">new</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">Money</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_value</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">);</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    }</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">void</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">_default</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__initialised</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 1;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__d</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 0;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__default</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = 1;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    }</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    ~</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">nullable_money</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">() {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">_release_member</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    }</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">void</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">_release_member</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> () {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> (!</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__initialised</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">)</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">        </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">return</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">switch</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__d</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">) {</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">        </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">case</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> 1:</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">          </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">delete</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd_v</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">          </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">break</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">        </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">default</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">:</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">          </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">          </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">break</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      } </span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">      </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">_pd__initialised</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">false</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">;</span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">    }</span></p><p class="MsoNormal"> </p><p class="MsoNormal">Regards,</p><p class="MsoNormal">Daniel.</p><p class="MsoNormal"> </p></div></body></html>