Home Help Center

about out parameter

simpleysimpley Member ✭✭
when I see the changes of ice 1.3, I find one change of 1.3 is clear the contents of the sequence of string before unmarshaling, does it mean if I use an out parameter with a request, the before contents of this parameter will be cleared?
thanks

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    An out parameters is conceptually just that: an out parameter. This means that the value travels from server to client and that any prevous value is simply irrelevant.

    Or, in other words, conceptually, the previous value is simply discarded, at least if the RPC succeeds. If the RPC fails (throws an exception), you cannot make any assumptions about the state of an out parameter. It may still have the old content, have different content, or no content at all. In case of an exception, all bets are off.

    Cheers,

    Michi.
  • simpleysimpley Member ✭✭
    thanks michi:
    but when I use ice1.2, the previous contents of an out parameter will keeping until I erase them explicitly, other words, if I do not erase them , and use it again and again, the size of this out parameter will keep increasing, is right?
    The question again, in 1.3, the previous contents will be discarded when I use this out parameter again?
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Originally posted by simpley
    thanks michi:
    but when I use ice1.2, the previous contents of an out parameter will keeping until I erase them explicitly, other words, if I do not erase them , and use it again and again, the size of this out parameter will keep increasing, is right?

    That's correct, but only for string sequence out parameters -- for other types of out parameters, the previous contents are erased correctly in Ice 1.2.

    The question again, in 1.3, the previous contents will be discarded when I use this out parameter again?

    Right. It was always meant to work that way -- we simply had a bug in the code that unmarshals string sequences.

    Cheers,

    Michi.
Sign In or Register to comment.