[omniORB] basic parameter passing question

Luke Deller ldeller at xplantechnology.com
Thu Dec 1 16:28:44 GMT 2005


On Thu, 2005-12-01 at 13:16 +1100, Anthony Shipman wrote:
> On Thursday 01 December 2005 03:18, you wrote:
> > The problem with your first case is that you're making TWO copies of the
> > ref and the server side stub only takes ownership of one of the copies.
> >
> 
> As I understand it, in the first case the _var is cast to a _ptr and then 
> passed to duplicate(). So there is only one copy of the ref being made.

Yes, I agree that your code snippets look correct and shouldn't leak.
It is unconventional to have a function which returns a reference to a
_var, which is perhaps what confused the other posters (?)

I tried something similar here with omniORB-4.0.6 and didn't get a leak.
Does your leak analysis tool show where in the code the leaked memory
was allocated?  Can you give us a complete small example that produces a
leak?

Regards,
Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege.  If you are not
the intended recipient you must not use, distribute or copy this
email.  If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************




More information about the omniORB-list mailing list