Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-16-2004
simpley simpley is offline
Registered User
 
 
Join Date: Aug 2003
Location: beijing
Posts: 43
about out parameter

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
Reply With Quote
  #2 (permalink)  
Old 03-16-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
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.
Reply With Quote
  #3 (permalink)  
Old 03-17-2004
simpley simpley is offline
Registered User
 
 
Join Date: Aug 2003
Location: beijing
Posts: 43
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?
Reply With Quote
  #4 (permalink)  
Old 03-18-2004
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
Quote:
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.
Quote:

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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
object id with category can't be a template parameter? Yunqiao Yin Bug Reports 1 06-09-2006 09:27 AM
vc 7.1 unreferenced formal parameter xdm Help Center 2 06-06-2005 09:24 AM
how to trace the problem about in or out parameter? huaciom Help Center 3 05-18-2005 01:47 AM
vector as out parameter Dmitriy Help Center 10 06-29-2004 04:39 AM
Constructor and Default-Parameter Mr.Freeze Help Center 1 08-13-2003 08:07 AM


All times are GMT -4. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.