Reset RMWCount when DEALLOC rmw storage of wait set (#209)
* Reset RMWCount when DEALLOC rmw storage of wait set It is safe to reset RMWCount when free rmw storage of wait set Signed-off-by: jwang <jing.j.wang@intel.com> * setting RMWCount to 0 only when RMWStorage is set to NULL Signed-off-by: jwang <jing.j.wang@intel.com>
This commit is contained in:
parent
4ed6c56edd
commit
1d35c60c7b
1 changed files with 1 additions and 0 deletions
|
@ -320,6 +320,7 @@ rcl_wait_set_get_allocator(const rcl_wait_set_t * wait_set, rcl_allocator_t * al
|
||||||
if (wait_set->impl->RMWStorage) { \
|
if (wait_set->impl->RMWStorage) { \
|
||||||
allocator.deallocate((void *)wait_set->impl->RMWStorage, allocator.state); \
|
allocator.deallocate((void *)wait_set->impl->RMWStorage, allocator.state); \
|
||||||
wait_set->impl->RMWStorage = NULL; \
|
wait_set->impl->RMWStorage = NULL; \
|
||||||
|
wait_set->impl->RMWCount = 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SET_RESIZE_RMW_REALLOC(Type, RMWStorage, RMWCount) \
|
#define SET_RESIZE_RMW_REALLOC(Type, RMWStorage, RMWCount) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue