[omniORB] How to destroy objects
Stefan Walter
Stefan.Walter at lisec.com
Tue Jul 2 14:18:23 BST 2013
Hello,
how do I destroy objects in omniORB which are not longer required.
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.
What if I don't need the "obj" anymore? How can I destroy it?
Thanks and Regards,
Stefan
-------------------------------------------------------------------------------------------------------
intmain (int argc, char **argv) { try { CORBA::ORB_var orb =
CORBA::ORB_init(argc, argv);
CORBA::Object_var obj = getObjectReference(orb);
Echo_var echoref = Echo::_narrow(obj);
for (CORBA::ULong count=0; count < 10; count++) hello(echoref);
orb->destroy(); } catch(CORBA::TRANSIENT&) { cerr << "Caught system
exception TRANSIENT -- unable to contact the " << "server." << endl; }
catch(CORBA::SystemException& ex) { cerr << "Caught a CORBA::" <<
ex._name() << endl; } catch(CORBA::Exception& ex) { cerr << "Caught
CORBA::Exception: " << ex._name() << endl; }
catch(omniORB::fatalException& fe) { cerr << "Caught
omniORB::fatalException:" << endl; cerr << " file: " << fe.file() <<
endl; cerr << " line: " << fe.line() << endl; cerr << " mesg: " <<
fe.errmsg() << endl; } return 0;}
__________________________________________
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.
Der Inhalt dieses E-Mails ist vertraulich und für die alleinige
Verwendung durch den beabsichtigten Empfänger bestimmt. Falls Sie nicht
der beabsichtigte Empfänger sind, bitten wir Sie den Absender umgehend
zu informieren und dieses E-Mail samt angeschlossenen Dateien zu
löschen. Wir können keine Haftung für allfällige Schäden übernehmen,
die aufgrund von Software-Viren entstehen, und empfehlen Ihnen, selbst
Virenprüfungen durchzuführen, bevor Sie eine Anlage öffnen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20130702/2b3fc8a6/attachment.html>
More information about the omniORB-list
mailing list