<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16618"></HEAD>
<BODY style="FONT: 10pt Segoe UI; MARGIN: 4px 4px 1px">
<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>how do&nbsp;I destroy objects in omniORB which are not longer required.</DIV>
<DIV>&nbsp;</DIV>
<DIV>If you look at the code below (from the echo example), the only destroy happens on the "orb" and not on the "obj" at the end.</DIV>
<DIV>&nbsp;</DIV>
<DIV>What if&nbsp;I don't need the "obj" anymore? How can I destroy it?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks and Regards,</DIV>
<DIV>Stefan</DIV>
<DIV>-------------------------------------------------------------------------------------------------------</DIV>
<DIV><SPAN style="COLOR: #808000">int</SPAN><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #000000">main</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #808000">int</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">argc</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #808000">char</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">**</SPAN><SPAN style="COLOR: #000000">argv</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">try</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>ORB_var<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">orb</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>ORB_init<SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">argc</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">argv</SPAN><SPAN style="COLOR: #000000">);</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"><BR></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>Object_var<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">obj</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">getObjectReference</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">orb</SPAN><SPAN style="COLOR: #000000">);</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"><BR></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>Echo_var<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">echoref</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>Echo<SPAN style="COLOR: #000000">::</SPAN>_narrow<SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">obj</SPAN><SPAN style="COLOR: #000000">);</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"><BR></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN><SPAN style="COLOR: #808000">for</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">(</SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>ULong<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">count</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000080">0</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">count</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000080">10</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">count</SPAN><SPAN style="COLOR: #000000">++)</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">      </SPAN><SPAN style="COLOR: #000000">hello</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">echoref</SPAN><SPAN style="COLOR: #000000">);</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-paragraph-type: empty"><BR></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN><SPAN style="COLOR: #000000">orb</SPAN><SPAN style="COLOR: #000000">-&gt;</SPAN>destroy<SPAN style="COLOR: #000000">();</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #000000">}</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">catch</SPAN><SPAN style="COLOR: #000000">(</SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>TRANSIENT<SPAN style="COLOR: #000000">&amp;)</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"Caught</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">system</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">exception</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">TRANSIENT</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">--</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">unable</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">to</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">contact</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">the</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">         </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"server."</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #000000">}</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">catch</SPAN><SPAN style="COLOR: #000000">(</SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>SystemException<SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">ex</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"Caught</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">a</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">CORBA::"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">ex</SPAN><SPAN style="COLOR: #000000">.</SPAN>_name<SPAN style="COLOR: #000000">()</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #000000">}</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">catch</SPAN><SPAN style="COLOR: #000000">(</SPAN>CORBA<SPAN style="COLOR: #000000">::</SPAN>Exception<SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">ex</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"Caught</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">CORBA::Exception:</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">ex</SPAN><SPAN style="COLOR: #000000">.</SPAN>_name<SPAN style="COLOR: #000000">()</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #000000">}</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">catch</SPAN><SPAN style="COLOR: #000000">(</SPAN>omniORB<SPAN style="COLOR: #000000">::</SPAN>fatalException<SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">fe</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">{</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"Caught</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">omniORB::fatalException:"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #008000">file:</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">fe</SPAN><SPAN style="COLOR: #000000">.</SPAN>file<SPAN style="COLOR: #000000">()</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #008000">line:</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">fe</SPAN><SPAN style="COLOR: #000000">.</SPAN>line<SPAN style="COLOR: #000000">()</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">    </SPAN>cerr<SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #008000">mesg:</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #008000">"</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">fe</SPAN><SPAN style="COLOR: #000000">.</SPAN>errmsg<SPAN style="COLOR: #000000">()</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN>endl<SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #000000">}</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #c0c0c0">  </SPAN><SPAN style="COLOR: #808000">return</SPAN><SPAN style="COLOR: #c0c0c0"> </SPAN><SPAN style="COLOR: #000080">0</SPAN><SPAN style="COLOR: #000000">;</SPAN></PRE><PRE style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><SPAN style="COLOR: #000000">}</SPAN></PRE></DIV><BR>

    <div>
      <font size="1" color="#999999" face="Nimbus Sans L">______________________________
</font><font size="1" face="Nimbus Sans L"><br></font><font size="1" color="#999999" face="Nimbus Sans L">The 
      content of this e-mail is confidential and restricted for the use of the 
      intended recipient only. If you are not the intended recipient please 
      inform the sender immediately and delete this e-mail and any attachments. 
      We cannot accept liability for any damage incurred as a result of 
      software viruses and advise that you carry out your own virus checks 
      before opening any attachment.</font><font size="1" face="Nimbus Sans L"><br><br></font><font size="1" color="#999999" face="Nimbus Sans L">Der 
      Inhalt dieses E-Mails ist vertraulich und f&#252;r die alleinige Verwendung 
      durch den beabsichtigten Empf&#228;nger bestimmt. Falls Sie nicht der 
      beabsichtigte Empf&#228;nger sind, bitten wir Sie den Absender umgehend zu 
      informieren und dieses E-Mail samt angeschlossenen Dateien zu l&#246;schen. 
      Wir k&#246;nnen keine Haftung f&#252;r allf&#228;llige Sch&#228;den &#252;bernehmen, die aufgrund 
      von Software-Viren entstehen, und empfehlen Ihnen, selbst Virenpr&#252;fungen 
      durchzuf&#252;hren, bevor Sie eine Anlage &#246;ffnen.</font>
    </div>
  </BODY></HTML>