[omniORB] basic question about sequences
Clarke Brunt
clarke.brunt at trafficmaster.co.uk
Tue Aug 5 16:01:40 BST 2008
>...
>(of course this works without auto_ptr, but it's a good habbit to
>prevent memory leaks - you could also use _var and then release it, put
>personally I prefer auto_ptr)
Just to be awkward, I take the opposite view and use _var (well we _are_
using CORBA anyway) :-)
So if you want to take the _var route, then
seq_type_var ret = new seq_type; // as first line of implementation
ret[i] = whatever; // don't want a '*' here
return ret._retn(); // as last line
// other lines the same
And, without taking the time to remind myself of all the detail of this,
isn't it necessary also to create a new sequence for the 'out' parameter? I
would have thought it likely to contain a NULL otherwise.
More information about the omniORB-list
mailing list