Expensive return by value

in Help Center
I have a server-side method that returns a sequence to the client:
The C++ abstract class produced by slice2cpp dictates that GetPosition() returned vector<Position> by value which is expensive for bigger vectors.
Is it possible to return a smart pointer instead? If not, what other solutions exist?
sequence<Position> PositionList; interface ServerOps { PositionList GetPositions(); };
The C++ abstract class produced by slice2cpp dictates that GetPosition() returned vector<Position> by value which is expensive for bigger vectors.
Is it possible to return a smart pointer instead? If not, what other solutions exist?
0
Comments
If you can't, you could use AMD (asynchronous method dispatch) in your server for this operation. The "return" parameter becomes an "in" parameter on the AMD callback.
Best regards,
Bernard
How does this help? A copy of the SharedPositionList will be returned which will contain a COPY of PositionList.