Repository navigation
Refactoring of create_* and destroy_* functions - #45
Conversation
|
Working on a similar pr for opensplice now. |
|
+1 |
|
Overall it looks good. I think all the |
|
Maybe the lambda would be cleaner, but I'm not convinced of that since you'd have to capture all of the variables, not sure if a catch all capture would work. Either way, this is like my 16th iteration on this change set and I'm not particularly motivated to make such an intrusive non-functional change 😄. |
There was a problem hiding this comment.
Seeing the dangling dereference arrow as input to the TRY_DESTRUCTOR macros is jarring for me. Are trying to leave the option open for another dereference operator besides ->?
Answered my own question, looks like you use operator . at later points in the code
There was a problem hiding this comment.
Answered my own question, looks like you use operator . at later points in the code
^, I didn't want to make two, really long named macros, but we could do that too. Also I could just put the whole destructor statement in there, but this is where I ended up.
There was a problem hiding this comment.
Ok, I moved the macros to a common header in rmw and I changed them such that they pass the entire destructor statement (no dangling -> or .).
|
I've addressed all of the comments, pending the decision about |
6b03a0c to
d131871
Compare
There was a problem hiding this comment.
I ran uncrustify over this already and I wouldn't call that indent wrong, but it is an alternative indent that we don't usually use. In this case I think it looks fine, in other cases like this:
some_really_long_named_function_that_does_stuff(arg1,
arg2,
arg3);I think that style doesn't make sense, but there has to be some room for developer discretion in these types of things.
|
All tests related to Therefore I looked at the type creation function - especially for arrays. For the subscriber: https://github.com/ros2/rmw_connext/blob/962fe936019c0fa081cb3c0d08661b85edb3502b/rmw_connext_dynamic_cpp/src/functions.cpp#L302-L360 The code first create the type support for the base type and then if it is an array creates the type support for the array / sequence which is based on the base type. But the PR removes the base type support which is required for the array / sequence type support: 5e7236f#diff-d8fc519447c043a7165e1ff89d1c2088R325 I have fixed the type support in commit 6cf72f33f898dffe5c2614ebc72a0153170cd54d. |
|
Ok thanks, I guess this will be captured in the CI job you just started?: |
|
Jenkins looks great... +1 |
There was a problem hiding this comment.
Is destroy_type_code invoked for every type code which is being created? If yes, I would assume that should be sufficient.
Or are there currently cases where it not invoked yet?
There was a problem hiding this comment.
I think I just forgot to remove this after a refactoring (hidden due to the squash). I removed it in de87fd8
This has been done to resolve some teardown related errors and generally to improve the state of memory management in these implementations.
I've done several things here:
Things that are yet to be done (covered by TODO's):
register_typeon the participant, but it's not clear if we must unregister them or if so, when we should unregister them.Connects ros2/ros2#69