[omniORB] Memory leaks
Duncan Grisby
duncan at grisby.org
Tue Feb 27 14:10:20 GMT 2007
On Tuesday 27 February, "=?ISO-8859-1?Q?Aida_F=E1tima_Cano?=" wrote:
> It is normal that, after calling orb->destroy(),
> orb->pd_ref->[omniORB]->pd_refCount equals 1 ?
If the refCount is 1, that means you are still holding a reference to
it, so it has not been deleted. It has been destroyed, meaning it is no
longer operative, and all the threads and so on have stopped, but the
C++ ORB object cannot be deleted until all references are released.
You should use a _var type to hold the ORB reference, like this:
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
then when the variable goes out of scope, the reference count will be
decremented and the C++ objects can be deleted (assuming you haven't
leaked a reference anywhere else).
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list