[omniORB] create_reference_with_id
Duncan Grisby
duncan at grisby.org
Thu Jul 27 18:09:00 BST 2006
On Wednesday 26 July, Jun wrote:
> I'm relatively new in CORBA and working to implement a ServantLocator.
Have you read Michi Henning and Steve Vinoski's book, "Advanced CORBA
Programming with C++"? At least the sections about ServantLocators? If
not, I strongly recommend that you do so.
> One question I have is what does POA.create_reference_with_id exactly do?
It creates an object reference in the POA with the given id. That is all
it does.
> Since I'm using a ServantLocator, it should just generate object reference
> and shouldn't cache the newly generated reference?
It generates an object reference and returns it. It is your
responsibility to release the reference it gives you.
> I'm asking this because I'm seeing a memory leak in my test server.
> As a test I have put a loop in ServantLocator.preinvoke() to call
> create_reference_with_id repeatedly and this seems to increase the memory
> usage.
Do you release the object references given to you with
create_reference_with_id? If not, that's the cause of your leak. As an
aside, why are you calling create_reference_with_id inside preinvoke?
That's an unusual thing to do there.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list