https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=656
Summary: 'dot' operations in scripting operate on copy of data
Product: RTT
Version: rtt-trunk
Platform: AMD 64bit
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Scripting
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Context: scripting, use of std::vector
During some playing with the unit tests, I discovered that when using a 'dot'
operator
in scripting (like my_vect.capacity() ) makes a copy of your data and then
returns the capacity of that copy. As a consequence, this is not real-time
safe.
As another side-effect, capacity() is always equal to size() (because making a
copy
adjusts the capacity of the copy to the actual size).
The correct behaviour should be to operate on a reference or const reference of
the data,
such that no copy is made.
At least, that's what I think that's going on...
If other type toolkits also use the dot operator, could their maintainer check
this statement,
ie: check if the copy constructor is called if a dot operation is used in
scripting ?
Peter
[Bug 656] 'dot' operations in scripting operate on copy of data
https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=656
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution| |WONTFIX
Status|NEW |RESOLVED
--- Comment #1 from Peter Soetens <peter [..] ...> 2010-12-21 10:58:49 ---
We can't fix this in the 1.x line. This is no longer an issue in 2.x.