Stefan Walter
2013-07-02 13:18:23 UTC
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>
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>