[omniORB] ORB initialization with endpoint leaks memory if
initialization fails
Bruce Visscher
bruce.visscher at gmail.com
Wed Sep 2 14:35:04 BST 2009
Martin,
I am not sure that what you are trying to do is valid. Specifically,
the ORB is a singleton so I do know that initializing the ORB, using
it, shutting it down then starting it back up is not allowed.
In your case, since the initialization exits via exception I suppose
it could be argued that the initialization is not complete so perhaps
it should "roll back" and this should be allowed. I would be curious
to know whether this is required to work by the CORBA standard (okay,
I was too lazy to check myself).
On the other hand, I don't really understand what you are trying to
accomplish. I would expect that either you let the system allocate a
port for you and somehow make available any resulting object reference
(for example by using omninames or some other CosNaming service
implementation) or else you would have the system reserve a specific
port for your server and make your object references persistent using
the given port number. I don't see where the third option that you
propose of trying to allocate a port by trial and error within a
certain range would be useful. (It also occurs to me that if you
really want to do this just let the program exit via exception and
move the for loop out to the shell...)
Bruce
More information about the omniORB-list
mailing list