[Bug 443] New: Commands may use twice as much memory as necessary

For more infomation about this bug, visit
Summary: Commands may use twice as much memory as necessary
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created an attachment (id=155)
--> (https://svn.fmtc.be/bugzilla/orocos/attachment.cgi?id=155)
Patch to use shared_ptr in Command<> implementation.

There are two ways adding a command to a component interface:
1. Use the Command my_command object and register that
object to the CommandRepository
2. Use the command( &foo, &foo_cond, &bar) factory function and
register the result of that call to the CommandRepository.

Option 1. uses twice as much as memory as option 2., as the command object
stores the same info as the CommandRepository, while in 2., there is no command
object, hence the data is stored only once.

Event and Method do not have this issue, as boost::shared_ptr is used.
Likewise, Command<> could use a shared_ptr implementation to solve the same
issue. I have a patch, but again, this makes the command code even harder to
read than it already is...

Configure bugmail: https://svn.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
Orocos-Dev mailing list
Orocos-Dev [..] ...

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm