Re: Object Reference counting idea.



On 10 Oct 2000, Miguel de Icaza wrote:

> 	CORBA_Object_duplicate does not achieve any real reference
> 	counts at all, it is an ORB internal for returning data.

I want to clarify CORBA_Object, CORBA_Object_duplicate, and
CORBA_Object_release, because people often seem to get confused about them
and think there is refcounting going on.

Think of CORBA_Object as a "pointer" to an object (aka "reference" - C++
terminology I guess :) - it tells the ORB how to get to the object
implementation, etc. Since there is more magic involved in talking to
objects than just dereferencing a machine pointer, these CORBA_Objects
must be freed by CORBA_Object_release to discard them.

CORBA_Object_duplicate makes a copy of one of these CORBA_Object pointers,
should you need to do something such as give ownership of a CORBA_Object
to another module of your program.

-- Elliot
DEAR IRS, Please cancel my subscription.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]