Bug 1938 - Possible incorrect duplication in sequences of references
Summary: Possible incorrect duplication in sequences of references
Status: RESOLVED FIXED
Alias: None
Product: TAO
Classification: Unclassified
Component: ORB (show other bugs)
Version: 1.4.2
Hardware: All All
: P3 normal
Assignee: Johnny Willemsen
URL:
Depends on:
Blocks: 1929
  Show dependency tree
 
Reported: 2004-09-20 18:03 CDT by Carlos O'Ryan
Modified: 2006-04-19 07:30 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Ryan 2004-09-20 18:03:57 CDT
This refers to the helper class returned by operator[] in sequences of strings,
wide-strings and object references.  This helper class is required to have an
assignment operator that releases the  underlying element *only* if the sequence
release flag is true.

TAO's implementation honors this requirement, but it also increments the
reference on the rvalue assigned to the sequence element.  Regardless on the
release flag value.

If the release flag is false the application is in charge of releasing this
memory, but I do not think the application should be expected to release some
elements that the sequence decided to duplicate on its own.  The spec is silent
but I believe the approach described in this bug report follows the principle of
least surprise.
Comment 1 Carlos O'Ryan 2004-09-20 18:04:20 CDT
Yet another sequence bug.
Comment 2 Johnny Willemsen 2005-11-23 06:59:37 CST
Reassign, this one is handled in the sequenceupdate branch which will be made
public with the x.5.2 release
Comment 3 Johnny Willemsen 2006-03-03 08:55:22 CST
accepting, will be fixed after x.5.1 is out
Comment 4 Johnny Willemsen 2006-04-19 07:30:07 CDT
Wed Apr 19 07:48:12 UTC 2006  Johnny Willemsen  <jwillemsen@remedy.nl>