Re: [orbitcpp-list] Re: TypeCode for ORBit-C++
Status: Beta
Brought to you by:
philipd
|
From: Phil D. <ph...@us...> - 2000-10-31 12:09:23
|
Sam Couter writes:
>
> Heh. Check out page 56 of "The Common Object Request Broker: Architecture
> and Specifications" for an example of C++ code where the return types from
> create_recursive_tc() and create_value_tc() seem to be a TypeCode_var.
>
If the example is something like:
// C++
CORBA::TypeCode_var new_tc = orb->create_struct_tc(
"IDL:MyStruct:1.0",
"MyStruct",
mems
);
Then the return type *is* CORBA::TypeCode_ptr, it's just that the
client is using an _var type to wrap it so that they don't have to
call CORBA::release() on the reference after use.
> I'll modify the prototypes to match what you've suggested, for two reasons:
> 1) It will match the C++ mapping correctly.
> 2) I can't get it to work using TypeCode_var return types anyway. :)
Probably because the reference is being prematurely released by a
temporary _var. (Any C++ lawyers care to confirm or deny?)
Cheers,
Phil
|